NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 7 8 9 10 11 … 93 Next »
Newtonsoft.Json

 
  • 0 Vote(s) - 0 Average
Newtonsoft.Json
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,106
Threads: 957
Joined: May 2006
#1
2013-08-13, 11:26 PM
For dll's that might have widespread use what do other dev's think is the best method of distribution? I don't expect NextPVR will be able to load different version of the dll for different plugins so common might be ok, except sub might have a future need. For the next release I need Newtonsoft.Json in SearchLite and imageGrabLite

Martin
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#2
2013-08-14, 04:34 AM
I haven't used Newtonsoft.Json since my Netflix plugin. I started using
Code:
System.Web.Script.Serialization.JavaScriptSerializer
instead. With .Net 4, I use
Code:
System.Runtime.Serialization.Json.DataContractJsonSerializer

But to answer your question, common would be a good place (until sub needs to make use of it).
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,106
Threads: 957
Joined: May 2006
#3
2013-08-14, 04:57 AM
Ok thanks for your feedback, I will try Common unless others balk.

I guess I opt for the extra performance. http://james.newtonking.com/archive/2013...mance.aspx

Martin
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#4
2013-08-14, 05:29 AM (This post was last modified: 2013-08-14, 05:35 AM by whurlston.)
For most of my usage, I would never see the gains he shows in that chart due to the small blocks of JSON data. Parsing 4 youtube pages in a row (for some tests I was doing) to get the streams, my Deserialize times on the pages are as follows:

126 ms
3 ms
5 ms
2 ms

As you can see, the first one takes the most time but subsequent ones are much, much quicker. There are also three deserializations happening per page so thats an average of about 1ms/deserialization on pages after the first. This was also running the debugger (launched from VS 2012) so there is a performance hit there as well.

Granted, if I was still working with the Netflix dataset, I would be looking at more places to increase performance.

Edit: The skewed time on the first deserialization is due to the time required to load the required assemblies for the first time.
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#5
2013-08-15, 04:19 AM
Martin, have you seen the FridayThe13th json parser? http://procbits.com/2011/08/11/fridaythe...ht-and-net

It looks pretty interesting and is supposedly faster than NewtonSoft's.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,106
Threads: 957
Joined: May 2006
#6
2013-08-15, 05:49 AM
Doh, t took me a few seconds to figure out the name. Thanks, I do like the option to camelize, I'll keep it it my bag of trickes to try. The new Schedules Direct API uses JSON and it involves 1000's and 1000s of potential JSON calls.

Martin
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#7
2013-08-15, 06:13 AM
Yeah, I thought the name was pretty clever. Big Grin

I'm adding it to my NExtUtility.dll (just a collection of useful functions) for now (with the intention of playing with it later) whose source will be released with the youtube plugin. I'm probably too far along with the youtube plugin to try using it on that but I might try it on some other projects I have in the works.

SD (or tv listings in general) would definitely be an area where I would be looking for area where I would be looking for all the performance I could get.

BTW: You only need the two .cs files located at https://github.com/jprichardson/FridayTh...dayThe13th -- no need to download the whole package.
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#8
2013-08-15, 08:58 AM
lol I had to google what the name meant, completely forgot his name was jason voorhees Smile (I was trying to read it as FridayTheieth, thinking what the heck is that...)
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,106
Threads: 957
Joined: May 2006
#9
2013-08-15, 03:25 PM
whurlston Wrote:BTW: You only need the two .cs files located at https://github.com/jprichardson/FridayTh...dayThe13th -- no need to download the whole package.

Ok thanks, including the source and not the binaries would make your code LGPL v2 which could be a concern.

Martin
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#10
2013-08-15, 05:10 PM
NExtUtilities is a collection of things that will be in multiple dlls. For example, NextPVR (semi-)specific functions (Onscreen keyboard popup, image processing, etc) will be in a base dll while DirectShow stuff will be in another (which will be LGPL'd). I haven't decided the license for the base dll yet but if I don't go with LGPL, I will move that to a separate dll like the DirectShow stuff.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  How to convert the startTIme value in json response? JavaWiz 3 1,972 2020-04-25, 12:35 AM
Last Post: JavaWiz
  NEWA JSON API oddity bgowland 3 2,809 2015-03-25, 03:23 AM
Last Post: bgowland
  Using JSON with C# bgowland 3 4,044 2011-06-29, 01:48 AM
Last Post: whurlston

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode