[Pharo-project] FilePlugin rant

Sven Van Caekenberghe sven at beta9.be
Thu Mar 1 05:14:55 EST 2012


Camillo,

On 01 Mar 2012, at 10:54, Camillo Bruni wrote:

> 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! 
> 
> Example:
> -----------------------------------------------------------
> 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...
> 
> best
> cami

I have

(FileDirectory default / 'package-cache') entries size 5053
[ (FileDirectory default / 'package-cache') entries ] timeToRun 2012

But if I run it in the Time Profiler, I get this:



How do you manage to track the primitive ?

Why/how would an extra primitive or better implementation of #entries break compatibility ?

Sven


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20120301/458ef161/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2012-03-01 at 11.12.46.png
Type: image/png
Size: 76777 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20120301/458ef161/attachment.png>


More information about the Pharo-dev mailing list