cPickle looks great

If you want it to be human readable, you can’t encrypt, compress or
otherwise obfuscate it, so both pickling and zlib is out. But think about
that for a second. If you are talking about multi-megabyte/gigabytes worth
of data, the mere quantity would make it uneditable regardless of the
format.

The part that i’m not sure of is the memory management when working with
huge chunks of data, and i’m even not comfortable at how to mesure and
control it.

I’m not sure why you would worry about that, unless you’ve experienced some
issues already? So long as you read the file into a variable, and that
variable isn’t kept around globally, then garbage collection would handle
this for you no matter which format you choose.

To get a memory leak, you’d really have to try.

import json

leak = list()
def read_file(fname):
  with open(fname) as f:
    data = json.load(f)
    leak.append(data)  # builds up over time

​

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBrcajZrWjMPad1K5Jkdk%3Dm0xRYqJqC%3DGNkggU-b%3DYfNA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to