[Pharo-project] FilePlugin rant

Camillo Bruni camillobruni at gmail.com
Thu Mar 1 04:54:59 EST 2012

I recently started to hack around Monticello due to very low response times when having a huge package cache.

Now interestingly the FilePlugin primitives for listing files are horrible! 

MC often requests a list of all mzc's cached locally:
	(FileDirectory default / 'package-cache') entries 

In my case there are  4300 mczs in the shared package-cache
timeToRun yields a nightmarish 2050ms for this, 
further investigation leads to the fact that most of the time is spent in the file primitive!

Now thats some 2ms for a single directory entry! 
[Just as a side note, ruby1.8 does the same job in 10ms :D]

primLookupEntryIn: fullPath index: index
	<primitive: 'primitiveDirectoryLookup' module: 'FilePlugin'>


I think we should definitely add another primitive which directly lists 
the file under a certain path.

Of course this will break compatibility with existing code, but
I think the current approach does not scale...


More information about the Pharo-dev mailing list