[Pharo-dev] File problems in Pharo 8

Cyril Ferlicot D. cyril.ferlicot at gmail.com
Tue Feb 12 13:40:11 EST 2019

Le 12/02/2019 à 18:56, Alistair Grant a écrit :
> Hi Cyril,
> I'm glad you're able to commit now. :-)
> A few comments on the performance:
> I haven't done a performance comparison for a while, and there have been
> a few changes in the plugin, so I'll keep it qualitative for now and try
> and run some more tests soon.
> FileReference>>exists should be significantly faster than before.  It
> used to retrieve all the file attributes (an array of values, mostly
> integers and booleans).  Now it just returns a boolean.
> Retrieving individual file attributes should also be faster.  E.g.
> FileReference>>modificationTime also retrieved all file attributes and
> threw away everything except the desired attribute.  Now it answers just
> the requested attribute.
> Retrieving a file entry, i.e. DiskDirectoryEntry, is probably a bit
> slower because more information is being retrieved than previously.
> FileReference>>exists gets called a lot.  So do requests for individual
> file attributes.  So my perception was that overall the system would
> probably be a bit faster than previously.
> However any application that iterates over a large number of files could
> well be slower because the Guide / Visitor system retrieves entries.

Thank you for the detailed explanation!

> Do you know how many files are being deleted when the system feels
> slower?

I was committing in Iceberg that is a Filetree repository. My change
impacted multiple package thus I would say it should be around 2500
files and 500 folders.

> It would be straightforward to modify the directory iteration primitives
> to only answer the file name instead of all attributes.  I'll have a
> look and see how easy it would be to modify the Guide / Visitor objects
> to retrieve only file names instead of entire entries.

So if possible it would make file copy/deletion even faster than before
IIUC? That would be really great!

> Cheers,
> Alistair

Cyril Ferlicot

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20190212/cbf4f3c4/attachment.asc>

More information about the Pharo-dev mailing list