[ENH][GOODIE] UnixFileDirectoryPlugin

David T. Lewis lewis at mail.msen.com
Mon Jan 14 01:49:40 UTC 2002


UnixFileDirectoryPlugin provides a significant improvement in
directory access speed on platforms with Posix style directory
streams.

The FileDirectory>>entries method performs poorly on Unix
systems because it causes repeated directory scans in the
support code.  This change set adds a UnixFileDirectoryPlugin
and a UnixFileDirectory>>entries method which, if the plugin
is available, replaces the repeated scans with a single read
of the directory stream contents.

The following expression runs about 8 times faster on my system
with the plugin installed:

  Time millisecondsToRun: [100 timesRepeat:
    [(FileDirectory on: '/etc') entries.
    (FileDirectory on: '/usr/bin') entries]]

This plugin was built entirely within Squeak using VMMaker,
OSProcess, and CommandShell.

- Dave

-------------- next part --------------
A non-text attachment was scrubbed...
Name: UnixFileDirectoryV1-0-dtl.cs.gz
Type: application/x-gunzip
Size: 4024 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20020113/80341b28/UnixFileDirectoryV1-0-dtl.cs.bin


More information about the Squeak-dev mailing list