asnakelover added the comment:
Yes, subprocess works fine and was the quickest to implement and
probably the fastest to run too.
How can I put this without being an ass? Hell, I'm no good at diplomacy
- the gzip module blows chunks - if I can shell out to a standard unix
util and it u
asnakelover added the comment:
The gz in question is 17mb compressed and 247mb uncompressed. Calling
zcat the python process uses between 250 and 260 mb with the whole
string in memory using zcat as a fork. Numbers for the gzip module
aren't obtainable except for readline(), which doesn&
asnakelover added the comment:
Hope this reply works right, the python bug interface is a bit confusing
for this newbie, it doesn't say "Reply" anywhere - sorry if it goes FUBAR.
I tried the splitlines() version you suggested, it thrashed my machine
so badly I pressed alt
New submission from asnakelover :
It's not a big problem because we can just shell to zcat but compare
these two:
$ time python ./b.py >/dev/null
real0m10.977s
user0m7.128s
sys 0m0.888s
$ time python ./a.py >/dev/null
real1m19.015s
user1m18.185s
sys