Hello,

I adapted our downstream tests to work with these changes and one of the things I remarked is that now you need to set the container of the entity before you add it to the model otherwise mooseName used for caching might contain nils. This happens because MooseGroupRuntimeStorage now caches the entities when the entities are added to the model (earlier the caching mechanism was lazy). So, I did a bit of fixing for our tools. So far, the tests are green.

Usman


On Wed, Sep 25, 2013 at 6:02 AM, Tudor Girba <tudor@tudorgirba.com> wrote:
Hi,

I would like to signal that Diego and Stephan worked on some internal changes to Moose-Core that can have impact on other code. So, here is a little review to start the discussion:


- mooseName is now cached. This can have an impact if you rely on your model to be more dynamic. If you have a custom entity that can receive sub-entities at runtime, you might want to resetMooseName. For example, if you modify the scope of a FAMIXType, the mooseName has to be reset:

FAMIXType>>container: aContainerEntity
container := FMMultivalueLink on: self
update: #types
from: self container
to: aContainerEntity.
self resetMooseName

This is supposed to be an optimization, but it makes the code more complicated. To see if it is actually worth it, we should benchmark the impact.

@Diego, @Stephan: Did you do some benchmarking on this?


- An entity now answers if it hasUniqueMooseNameInModel. This is at the moment used when caching the entity by name in groups. For example, Associations do not have a unique name and thus, they are not cached.


- There are some parts of the code I do not understand. For example, the need of this code:

MooseGroupStorage>>becomeKind: elementStorageClass   
...
self do: [ :each | each hasUniqueMooseNameInModel ifTrue: [ each privateClearMooseName ] ].
...


Did I miss anything?


Cheers,
Doru


--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev