[Q] changing keySize:

Chris Muller chris at funkyobjects.org
Tue Apr 25 03:17:45 UTC 2006


Hi,

> My City objects are of a medium complexity level. But the cities I'm
> persisting now have no many things.  They have a collection of names
> (most of the cases, just one, until now), and a city code.
> They know their country. And each country knows their cities. Though
> this double reference problem, I have some objects to avoid recursion
> and duplication.

I hope this is not for Magma's sake.  Magma can handle recursive
structures, no problem at all.  In fact, using a rich model of shared
objects is encouraged.

> The objects are created in memory.  I'm testing a migration from and
> old data base to Magma, but, for some specific reasons my plan is to
> upload them from this DB to memory, then persist the objects in
> Magma,
> and throw away the rest.

I can only guess that you do have some volume of data here..  It is
taking 12 seconds just to serialize your commit package and 16 seconds
to write the buffers?  On a Pentium 4 that's got to be a fair amount of
data.

I don't see that this portion of the migration can be reduced, but are
you loading them all in one commit or multiple smaller commits?  If
multiple small commits then it is important to keep your
#cachedObjectCount as low possible, but this means that you cannot have
them sitting around in memory.

I have tested WriteBarrier to see it speed up commit by a factor of 4x,
this would probably help but I can't promise I can support it.

> I'm not worried with time consumed on the
> migration. These could be a problem when the application will be
> running.
> The machine is a Pentium 4 with 512 MB RAM. It's not bad. But my
> image
> is too big. (100Mb) Could be this huge image a problem?

It could be a problem especially if the objects consuming memory are
the ones being committed to Magma.

> Other topic
> Is there any reason for not including this method: ?
> 
> MagmaCollectionReader>> union: aCollection
> 	"Answer the set theoretic union of two collections"
> 
> 	^ self asSet addAll: aCollection; yourself

Just an oversight.  Thanks for bringing to my attention.

If you can share a bit more on your migration program it might help. 
How many objects are you committing at a time and is there any way you
can get them out of memory?  Out of curiousity, what is your
#cachedObjectCount after loading the 10 cities?

It's also possible Magma may not be able to (quickly) handle the volume
of objects you are throwing at it..

Regards,
 Chris



More information about the Magma mailing list