[google-appengine] Re: Faster server-side json?
Starred On Mar 23, 2:55 pm, Andy Freeman ana...@earthlink.net wrote: According tohttp://blog.metaoptimize.com/2009/03/22/fast-deserialization-in-python/ , simplejson is significantly slower than cjson. I've created an issue requesting the fastest possible json athttp://code.google.com/p/googleappengine/issues/detail?id=1174. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Faster server-side json?
That's why issue 1174 requests the fastest possible json, not cjson. 1174 actually requests multiple jsons, so folks can use what's best for their application. On Mar 23, 10:32 pm, Joseph Turian tur...@gmail.com wrote: I am the author of the blog post. bUpdate (20090324):/b According to a href=http:// kbyanc.blogspot.com/2007/07/python-serializer-benchmarks.html rel=nofollowExtra Cheese/a, cjson 1.0.5 has an incompatibility with simplejson in processing slashes. A fix is available from a href=http://www.vazor.com/cjson.html; rel=nofollowMatt Billenstein/a. However, Dan Pascu, the author of cjson, deprecates Matt Billenstein's cjson 1.0.6 because Matt's patch parses the JSON twice, which makes it twice as slow. This will still be faster than all alternatives in certain circumstances. You will not find Matt's cjson on the cheeseshop, only on Matt's site. On Mar 23, 10:55 am, Andy Freeman ana...@earthlink.net wrote: According tohttp://blog.metaoptimize.com/2009/03/22/fast-deserialization-in-python/ , simplejson is significantly slower than cjson. I've created an issue requesting the fastest possible json athttp://code.google.com/p/googleappengine/issues/detail?id=1174.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Faster server-side json?
Just idly wondering, Have you done any quantitative measurement of how bad simplejson is? I can't imagine it being a large overhead, unless your application is seriously optimized to extremes already. David 2009/3/24 Andy Freeman ana...@earthlink.net: That's why issue 1174 requests the fastest possible json, not cjson. 1174 actually requests multiple jsons, so folks can use what's best for their application. On Mar 23, 10:32 pm, Joseph Turian tur...@gmail.com wrote: I am the author of the blog post. bUpdate (20090324):/b According to a href=http:// kbyanc.blogspot.com/2007/07/python-serializer-benchmarks.html rel=nofollowExtra Cheese/a, cjson 1.0.5 has an incompatibility with simplejson in processing slashes. A fix is available from a href=http://www.vazor.com/cjson.html; rel=nofollowMatt Billenstein/a. However, Dan Pascu, the author of cjson, deprecates Matt Billenstein's cjson 1.0.6 because Matt's patch parses the JSON twice, which makes it twice as slow. This will still be faster than all alternatives in certain circumstances. You will not find Matt's cjson on the cheeseshop, only on Matt's site. On Mar 23, 10:55 am, Andy Freeman ana...@earthlink.net wrote: According tohttp://blog.metaoptimize.com/2009/03/22/fast-deserialization-in-python/ , simplejson is significantly slower than cjson. I've created an issue requesting the fastest possible json athttp://code.google.com/p/googleappengine/issues/detail?id=1174.- Hide quoted text - - Show quoted text - -- It is better to be wrong than to be vague. — Freeman Dyson --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Faster server-side json?
The referenced post has examples of simplejson taking 10x more time than cjson. 10x difference in a component is noticeable for some applications. It also shows that pickle is much slower and has 2x bigger output than json for objects. (For strings, they all should be roughly the same.) I mention pickle because it's used by memcache. Since both pickle and json should be very efficient for strings, it may make sense to memcache json output instead of objects. In addition, some people are using pickle to create datastore blobs. Perhaps json is a better choice. On Mar 24, 1:39 pm, David Wilson d...@botanicus.net wrote: Just idly wondering, Have you done any quantitative measurement of how bad simplejson is? I can't imagine it being a large overhead, unless your application is seriously optimized to extremes already. David 2009/3/24 Andy Freeman ana...@earthlink.net: That's why issue 1174 requests the fastest possible json, not cjson. 1174 actually requests multiple jsons, so folks can use what's best for their application. On Mar 23, 10:32 pm, Joseph Turian tur...@gmail.com wrote: I am the author of the blog post. bUpdate (20090324):/b According to a href=http:// kbyanc.blogspot.com/2007/07/python-serializer-benchmarks.html rel=nofollowExtra Cheese/a, cjson 1.0.5 has an incompatibility with simplejson in processing slashes. A fix is available from a href=http://www.vazor.com/cjson.html; rel=nofollowMatt Billenstein/a. However, Dan Pascu, the author of cjson, deprecates Matt Billenstein's cjson 1.0.6 because Matt's patch parses the JSON twice, which makes it twice as slow. This will still be faster than all alternatives in certain circumstances. You will not find Matt's cjson on the cheeseshop, only on Matt's site. On Mar 23, 10:55 am, Andy Freeman ana...@earthlink.net wrote: According tohttp://blog.metaoptimize.com/2009/03/22/fast-deserialization-in-python/ , simplejson is significantly slower than cjson. I've created an issue requesting the fastest possible json athttp://code.google.com/p/googleappengine/issues/detail?id=1174.-Hide quoted text - - Show quoted text - -- It is better to be wrong than to be vague. — Freeman Dyson- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Faster server-side json?
These aren't the kind of quantitative I meant. ;) 10 times nothing is still nothing. What kind of overhead, in terms of time and CPU usage in a typical request in your application? It's just a bunch of string manipulation, it should be really cheap compared to even a single network/memcache/datastore access (seeing as CPU quota seems to be based mainly on request duration). 2009/3/24 Andy Freeman ana...@earthlink.net: The referenced post has examples of simplejson taking 10x more time than cjson. 10x difference in a component is noticeable for some applications. It also shows that pickle is much slower and has 2x bigger output than json for objects. (For strings, they all should be roughly the same.) I mention pickle because it's used by memcache. Since both pickle and json should be very efficient for strings, it may make sense to memcache json output instead of objects. In addition, some people are using pickle to create datastore blobs. Perhaps json is a better choice. On Mar 24, 1:39 pm, David Wilson d...@botanicus.net wrote: Just idly wondering, Have you done any quantitative measurement of how bad simplejson is? I can't imagine it being a large overhead, unless your application is seriously optimized to extremes already. David 2009/3/24 Andy Freeman ana...@earthlink.net: That's why issue 1174 requests the fastest possible json, not cjson. 1174 actually requests multiple jsons, so folks can use what's best for their application. On Mar 23, 10:32 pm, Joseph Turian tur...@gmail.com wrote: I am the author of the blog post. bUpdate (20090324):/b According to a href=http:// kbyanc.blogspot.com/2007/07/python-serializer-benchmarks.html rel=nofollowExtra Cheese/a, cjson 1.0.5 has an incompatibility with simplejson in processing slashes. A fix is available from a href=http://www.vazor.com/cjson.html; rel=nofollowMatt Billenstein/a. However, Dan Pascu, the author of cjson, deprecates Matt Billenstein's cjson 1.0.6 because Matt's patch parses the JSON twice, which makes it twice as slow. This will still be faster than all alternatives in certain circumstances. You will not find Matt's cjson on the cheeseshop, only on Matt's site. On Mar 23, 10:55 am, Andy Freeman ana...@earthlink.net wrote: According tohttp://blog.metaoptimize.com/2009/03/22/fast-deserialization-in-python/ , simplejson is significantly slower than cjson. I've created an issue requesting the fastest possible json athttp://code.google.com/p/googleappengine/issues/detail?id=1174.-Hide quoted text - - Show quoted text - -- It is better to be wrong than to be vague. — Freeman Dyson- Hide quoted text - - Show quoted text - -- It is better to be wrong than to be vague. — Freeman Dyson --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Faster server-side json?
agreed. starred the issue. cpickle would be nice too On Mar 23, 10:55 am, Andy Freeman ana...@earthlink.net wrote: According tohttp://blog.metaoptimize.com/2009/03/22/fast-deserialization-in-python/ , simplejson is significantly slower than cjson. I've created an issue requesting the fastest possible json athttp://code.google.com/p/googleappengine/issues/detail?id=1174. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Faster server-side json?
Starred, and thanks for finding that. One of the requests I expect to be the most popular in my app spits out json, so the faster the better! On Mar 23, 3:29 pm, bFlood bflood...@gmail.com wrote: agreed. starred the issue. cpickle would be nice too On Mar 23, 10:55 am, Andy Freeman ana...@earthlink.net wrote: According tohttp://blog.metaoptimize.com/2009/03/22/fast-deserialization-in-python/ , simplejson is significantly slower than cjson. I've created an issue requesting the fastest possible json athttp://code.google.com/p/googleappengine/issues/detail?id=1174. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Faster server-side json?
Starred :-) -- Web Blue Screen of Death http://pyoohtml.appspot.com/web-blue-screen-of-death On Mar 23, 3:55 pm, Andy Freeman ana...@earthlink.net wrote: According tohttp://blog.metaoptimize.com/2009/03/22/fast-deserialization-in-python/ , simplejson is significantly slower than cjson. I've created an issue requesting the fastest possible json athttp://code.google.com/p/googleappengine/issues/detail?id=1174. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---