EDIT: Specifically compression and extraction speeds.
Any Suggestions?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
So I made a random-ish large zipfile:
i.e., 116 MB with 23.4K files in it, and timed things:
this is the system-supplied commandline unzip binary — no doubt as finely-tuned and optimized as a pure C executable can be. Then (after cleaning up /tmp;-)…:
…and this is Python with its standard library – a bit more demanding of CPU time, but over 10% faster in real, that is, elapsed time.
You’re welcome to repeat such measurements of course (on your specific platform — if it’s CPU-poor, e.g a slow ARM chip, then Python’s extra demands of CPU time may end up making it slower — and your specific zipfiles of interest, since each large zipfile will have a very different mix and quite possibly performance). But what this suggests to me is that there isn’t that much space to build a Python extension much faster than good old
zipfile— since Python using it beats the pure-C, system-included unzip!-)