I have read the following text in the setuptools documentation:

For maximum performance, Python packages are best installed as zip files.


Why is it like this? one would think that the unzipping of the file would have negative impact on the performance. Thanks.

  • Is this client or server? For client, I see no advantage, except for saving on disk space. For server, a zip file will download more quickly to the client.
    – Mawg
    Commented Nov 14, 2014 at 12:09
  • Well, passing python code to be executed in a client somewhere else is not a very common practice, AFAIK. And still if so, it is about the performance of the python process.
    – bgusach
    Commented Nov 14, 2014 at 13:17

1 Answer 1


CPUs are fast and hard disks are (despite SSDs) slow. Thus it's usually faster to load compressed data from disk (less data to transfer) and uncompress it in memory (needs some CPU time).

  • Hmm, I didn't think of that, only of networking, but of course you are correct +1 and you should be awarded the answer
    – Mawg
    Commented Nov 14, 2014 at 12:53
  • The difference is extreme enough that newer versions of OSX actually compress memory to avoid needed to use virtual memory (this idea was not invented by Apple).
    – Brian
    Commented Nov 14, 2014 at 14:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.