On Mon, Jun 23, 2008 at 09:08:12PM +0400, Oleg Broytmann wrote: > On Mon, Jun 23, 2008 at 10:04:37AM -0700, Brett Cannon wrote: > > On Mon, Jun 23, 2008 at 4:46 AM, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > > > On Mon, Jun 23, 2008 at 12:07:00PM +0100, Nick Craig-Wood wrote: > > >> I imagine having the stdlib in one .zip will stop lots of seeking and > > >> improve the first time. > > > > > > Instead of seeking in the filesystem you end up seeking in the zip. Why > > > do you expect it'd be faster? > > > > I am going to guess Nick meant seeking in terms of "looking in the > > filesystem for a file", e.g. less stat calls.
Yes! Your disk can read consecutive sectors off the disk at 50 MB/s but it still takes an achingly long 10ms to seek to a different place on the disk. If you've got 100 files to read then that could be 1 second of wasted time. Now it won't be that bad normally because filesystems tend to cluster files that were written at the same time but it makes a lot of difference. If your files are in a nice big zip then there is much less seeking > Less stat calls in exchange for seeking in the zip "filesystem" plus > decompression. The zip filesystem is all layed out in one file which is very likely to be contiguous on the disk and available for reading at full disk speed. > IWBN if someone shows real numbers... Real numbers would be nice! On Mon, Jun 23, 2008 at 03:04:14PM -0400, Terry Reedy wrote: > Decompression time is balanced, probably more than balanced, by shorter > disk reading times. In the last twenty years, cpus have speed up much > more than disks, so tradeoffs have changed. I agree. In a recent upgrade my linux computer got compressed suspend to disk support. It now unsuspends in about half the time showing that decompression is much faster than disk reading. -- Nick Craig-Wood <[EMAIL PROTECTED]> -- http://www.craig-wood.com/nick _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com