On 5 Aug 2010, at 10:21, Stéphane Ducasse wrote:
On Aug 5, 2010, at 7:56 AM, Tudor Girba wrote:
> I committed another small change that has a significant impact on
> the speed of Groups and especially the Moose Finder.
> We used to have:
> ^self asArray
> Now we have
> In other words, we are not returning an Array but the original
> OrderedCollection. This makes up for a significant speed
> improvement when having large models. Tests are green, but if you
> encounter problems, please let me know.
> In any case, I noticed that we are actually using the storage of a
> group in a wrong way. We should always use the storage which is
> already a collection instead of directly using the entities of a
you lost me on that one: can you explain.
^ self entityStorage elements
EntityStorage that is a subclass of Collection. When we use
MooseEntity>>entities, we possibly ask for some conversion (for
example, before we converted to Array in RuntimeStorage) and this can
be expensive. Instead, internally we should always go through the
entityStorage to delegate to the EntityStorage and then rely on that
Is that clearer?
> "Problem solving efficiency grows with the abstractness level of
> problem understanding."
> Moose-dev mailing list
Moose-dev mailing list
"Be rather willing to give than demanding to get."