Zip archive performance

Andres Valloud sqrmax at optonline.net
Sat Oct 8 21:18:21 UTC 2005


Hello Cees,

Wednesday, October 5, 2005, 10:03:46 AM, you wrote:

CDG> The problem is that Archive>>addTree:match: only passes the
CDG> filename to new archive members (creating them with
CDG> #newFromFile:). When tracing calls, this ends up at
CDG> ZipNewFileMember>>from:, which calls the innocently-looking
CDG> #directoryEntry on StandardFileStream. However, this method
CDG> invokes another scan of the directory on the OS level and a
CDG> linear search over them. Which means that if you have a directory
CDG> with a hundred files, for every file these hundred files are
CDG> stat()'ed (or the Win32 equivalent from them)...

Typically, compressors first make a list of the files to compress and
then just use that instead of scanning folders and the like.  I'd
think that any approach that is equivalent to making a list first
will also be quite natural and unsurprising.

-- 
Best regards,
 Andres                            mailto:sqrmax at optonline.net




More information about the Squeak-dev mailing list