On Fri, Mar 2, 2012 at 8:41 AM, Tudor Girba <tudor(a)tudorgirba.com> wrote:
Thanks for re-pinging us. I somehow did not see it before. Strange :).
As far as I understand, you are worried about speed. Is that right?
It was partially about speed, but also about improving the implementation,
which I don't like very much. Fuel has features that were not available
when I wrote extensions's code.
In any case, the problem with your proposition is that some properties
are not stored in explicit instance variables, but in a dictionary in
EntityState. That means that only looking at the instance variables
you can miss important things. The ultimate truth of what needs to be
serialized lies in the meta-description. I would not know how to go
Thank you, I'll think on this in a couple of weeks.
On Fri, Mar 2, 2012 at 12:16 PM, Mariano Martinez Peck
> On Wed, Jan 4, 2012 at 10:47 PM, Mariano Martinez Peck
> <marianopeck(a)gmail.com> wrote:
>> On Thu, Dec 29, 2011 at 4:31 AM, Martin Dias <tinchodias(a)gmail.com>
>>> I'm looking to improve current implementation, and maybe you can help
>>> The current procedure is based in a custom serialization of each
>>> MooseElement. It's inspired on MSE, I describe this with the following
>>> serialize: aMooseElement
>>> (MooseModel meta descriptionOf: aMooseElement class) allAttributes
>>> do: [ :anAttribute |
>>> | values |
>>> values := anAttribute getFrom: aMooseElement.
>>> (self shouldIgnore: anAttribute withAll: values)
>>> ifFalse: [ self serialize: anAttribute withAll: values ] ].
>>> shouldIgnore: anAttribute withAll: values
>>> ^ values isEmpty or: [
>>> anAttribute isDerived or: [
>>> anAttribute type == FM3MetaDescription boolean and: [
>>> values size == 1 and: [
>>> values first == false ]]]]
>>> The advantage of serializing the MooseElements in this way (and not
>>> as a normal object) is to avoid storing unnecessary stuff that
>>> It's a disadvantage using FM3PropertyDescription>>getFrom: (and
>>> import, FM3PropertyDescription>>setOn:values:) which ends sending
>>> of the corresponding accessor selector. It'd be better to use
>>> (and #instVarAt:put:) as Fuel normally does.
>>> I hope I've been clear enough to explain up to this point. Now my
>>> Do you think Fuel can do something on each MooseElement like
>>> - clean up some unnecessary references
>>> - declare some instance variables as transient
>>> - if it's not good idea to modify the elements, create a method like
>>> MooseElement>>copyWithoutDerivedValues, and so actually serialize
>>> instead of the original element
>>> - any other
>>> and thus, serialize the MooseElements as normal Fuel objects, removing
>>> the custom procedure.
>>> I'll be happy to receive some help from Moose and Fame experts!
>>> Thanks in advance.
>>> Moose-dev mailing list
> Moose-dev mailing list
"Every thing has its own flow"
Moose-dev mailing list