On Oct 27, 2010, at 4:48 PM, Simon Denier wrote:
On 27 oct. 2010, at 16:27, Cyrille Delaunay wrote:
> Hello,
>
> I'm currently looking at the use of the PackageOrganizerCache in Moose.
> There was some work in pharo about a new, more performant, better-structured (I think
it's the idea ? :)) 'Package system' called RPackage.
> So before doing anything, I would like to know more about the use of
PackageOrganizerCache:
> - Why do we use a cache ? I guess this is because accessing directly parent packages
of specific classes or methods was to slow using the current package system.
> - If this is the good answer :), why was it too long? could another package system
(RPackage) solve this problem and avoid us to use a cache ?
> - For which kind of task is used the packageCache in Moose? I saw that it was used at
the import of smalltalk code, to link classes and method to their parent package, is that
all ?
Basically, yes, yes, and yes.
The current package system (PackageOrganizer + PackageInfo) is reeeally slow for some
tasks, like computing package of methods (to detect class extensions), and it really
brought down the Smalltalk importer to its knee on even not so large models. The big
problem now is linking the package organizer to system events, so that it updates itself
whenever a package is added, renamed, removed, changed...
So far this is not done in RPackage because the event were not there. But now they are
available so we should check that.
I will check and discuss that with cyrille because this will help us.
This was not done with PackageOrganizerCache because it's a bit
difficult and because it was just a workaround at the time. Now RPackage should replace
the current organizer and has to take care of such events. It also appear that RPackage
initializes itself faster than PackageOrganizerCache (probably because it's more
clever in its usage of PackageInfo API).
I do not know. So long that I looked at Rpackage.
Anyway, it's a problem specific to the Smalltalk importer, not to
Moose or Famix in general.
--
Simon
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev