Hi,
On 5 Aug 2010, at 10:21, Stéphane Ducasse wrote:
On Aug 5, 2010, at 7:56 AM, Tudor Girba wrote:
> Hi,
>
> I committed another small change that has a significant impact on
> the speed of Groups and especially the Moose Finder.
>
> We used to have:
> RuntimeStorage>>elements
> ^self asArray
>
> Now we have
> RuntimeStorage>>elements
> ^elements
>
> 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
> group.
you lost me on that one: can you explain.
We have
MooseAbstractGroup>>entities
^ 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
implementation.
Is that clearer?
Doru
>
> Cheers,
> Doru
>
> --
>
www.tudorgirba.com
>
> "Problem solving efficiency grows with the abstractness level of
> problem understanding."
>
>
>
> _______________________________________________
> Moose-dev mailing list
> Moose-dev(a)iam.unibe.ch
>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
"Be rather willing to give than demanding to get."