Author pitrou
Recipients bob.ippolito, pitrou, rhettinger, swalker, vkuznet
Date 2009-12-02.22:19:15
SpamBayes Score 3.53605e-08
Marked as misclassified No
Message-id <1259792382.3319.8.camel@localhost>
In-reply-to <1259779628.08.0.457204452131.issue6594@psf.upfronthosting.co.za>
Content
> Using cjson module, I observed 180MB of RAM utilization
> source = open('mangled.json', 'r')
> data = cjson.encode(source.read())
> 
> cjson is about 10 times faster!

This is simply wrong. You should be using cjson.decode(), not
cjson.encode().
If you do so, you will see that cjson tajes as much as memory as
simplejson and is actually a bit slower.

Looking at your json file, I would have a couple of suggestions:
- don't quote integers and floats, so that they are decoded as Python
ints and floats rather than strings
- if the same structure is used a large number of times, don't use
objects, use lists instead
History
Date User Action Args
2009-12-02 22:19:17pitrousetrecipients: + pitrou, rhettinger, bob.ippolito, swalker, vkuznet
2009-12-02 22:19:15pitroulinkissue6594 messages
2009-12-02 22:19:15pitroucreate