diegorep / pypng

Automatically exported from code.google.com/p/pypng
0 stars 0 forks source link

Reading is slow. #24

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
A quick test reveals that reading a PNG is several times slower than pngtopnm:

$ for a in `ran 3`; do time ./png.py -r tube1.png > /dev/null ; done

real    0m14.947s
user    0m14.238s
sys     0m0.707s

real    0m14.934s
user    0m14.209s
sys     0m0.721s

real    0m14.939s
user    0m14.220s
sys     0m0.718s
$ for a in `ran 3`; do time pngtopnm tube1.png > /dev/null ; done

real    0m0.806s
user    0m0.761s
sys     0m0.043s

real    0m0.803s
user    0m0.760s
sys     0m0.038s

real    0m0.795s
user    0m0.757s
sys     0m0.035s

more than 10 times slower is unacceptable.  

Original issue reported on code.google.com by d...@pobox.com on 18 Mar 2009 at 11:16

GoogleCodeExporter commented 8 years ago
Cold be that asRGB8() is slow.  Which is plausible given all those tuples it 
creates.

Original comment by d...@pobox.com on 18 Mar 2009 at 1:06