wow, i can see a lot of knowledge here, thanks a lot ! 
So, to clarify a bit, i already have the working prototype, that's why i'd 
like to optimize it now =] And i didn't mention it, but i'd also like to 
keep it editable out of maya (i.e. i'd go for a human readable encoding). I 
didn't know zlib, but it looks very handy, thanks for the tip ! But as it 
is compressed, i guess i can't export it in a readable way (even if i 
could, i'd loose the whole benefit of using it). However, for other 
purposes, it can be really great, i'll keep that in mind ^^

cPickle looks great as well, and based on your test, Justin. It even looks 
faster than json, i'm surprised it's less used.
So from what i've read here, json seems to be the best option for me (i 
also want something native, so no msgpack or ujson), but still, i guess 
i'll have to run some tests to compare it to raw text with no module. 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 assume this comes for free when working with modules, but i'd have to 
handle it if i export my stuff without ?



Le mercredi 5 octobre 2016 10:10:41 UTC+2, fruity a écrit :
>
> Hi there !
>
> I'm working on a skin weight IO tool (or similar), and i was wondering 
> what is the fastest way of reading/writing the datas, mainly between 
> configParser, json, xml and raw text.
> From my researches, it seems that json is the best take (even better if 
> ujson can be installed), but that sounds surprising, as i thought xml was 
> precisely done to handle huge datasets (and xml is also what maya uses to 
> export weights, btw). And finally, i'd like to know if writing raw text, 
> without using any parser, could be faster ? I don't really need to access 
> things line by line, so maybe this could be a fastest solution. But if i go 
> for raw text, then i don't really know how the memory will be handled (for 
> instance, if i have to read a 100 000lines file, does it mean that the 
> entire document needs to be loaded into memory, resulting in some memory 
> leaks or similar issues ? If i use a parser, the memory management will 
> come for free i guess ?)
> Any help will be more than welcome, i'm not familiar with those kind of 
> problems !
>
> Many thanks =]
>
>
>
>

-- 
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/bd3b4454-0a8a-4838-9000-aefbb120aa1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to