Slow performance
Sebastian Sastre
ssastre at seaswork.com
Thu Nov 8 18:54:37 UTC 2007
> I already need it badly.
>
Sure is just a comment Todd. I just refer to the discern at the time when
you have a trade of of being creative and being conservative. Creative is
risk conservaive is proven. I'm agresively creative when I have the risk
reasonably managed and furiously conservative when I need a solid base so it
does not inject me risk when I don't want it. So in short I was refering to
reinventing a dictionary as risky.
> Even if the root collection isn't a MagmaSet - the first
> collection I want to add is.
Then you put it under any meaning key like:
session begin.
session root
at: #system put: MySystemModel new;
at: #securities put: (MagmaSet equivalenceAttributes:
(Array with: #key));
yourself.
session commit
> So why doesn't that work?
>
> Also, I've found that changing the root doesn't work. The
> change doesn't save. So I had to throw away the db and start over.
>
It should work when used like that. Seriously, why use in the root object
somethig that is less flexible to design changes than a Dictionary kind of
object? Why one will ever need to do that?
Also make sure to make changes in the recently readed object in a beggined
transaction to then make changes to it and then commit.
cheers,
Sebastian
>
> On Nov 8, 2007, at 6:17 AM, Sebastian Sastre wrote:
>
> > ...
> >
> >> I want the root to act like a dictionary - so I set it up
> like this:
> >>
> >> | set |
> >> set := (MagmaSet equivalenceAttributes: (Array with: #key)).
> >> set addIndex: (MaSearchStringIndex attribute: #key).
> >> MagmaRepositoryController create: 'magma' root: set.
> >>
> > But Todd wait a minute, you're contradicting yourself.
> Why you want
> > to put in root aSet if you want it to behave like aDictionary?
> >
> > Frankly I would use a Btree in the root or even a plain Dictionary
> > like:
> >
> > MagmaRepositoryController create: 'magma' root: BTree
> new ...or
> > MagmaRepositoryController create: 'magma' root: Dictionary new
> >
> > They implements (more efficiently than a set of associations)
> > #at:put: message because is it's nature to do it and in the end you
> > seems to be trying to reivent with the set of associations.
> >
> > Simple things will allow you to grow. Try not to get
> involved with
> > complexities until you really need it badly,
> >
> > cheers !
> >
> > Sebastian
> >
>
More information about the Magma
mailing list