MagmaCollection vs Other Collections

Chris Muller afunkyobject at yahoo.com
Fri Aug 15 20:49:48 UTC 2003


> --- In squeak at yahoogroups.com, Jimmie Houchin <jhouchin at t...> wrote:
 
> What guideline should I use as to when it would be preferable to use a 
> MagmaCollection in Magma vs the Other Collections in Magma?

For multi-user systems, you need to estimate the concurrency.  Is the
collection going to need to be updated frequently and by lots of different
users?  Or is it an archival of something that won't change anymore?

Size is also a big consideration.  Anything over 2500-5000 entries, I would not
put in a standard Smalltalk collection in Magma.  I would probably find a way
to represent it in a deeper model or use a MagmaCollection.


> For example I am doing a 32,201 item collection.
> It is a collection of String(s). Most of them less the 2-300 characters.

Use a deeper model or a MagmaCollection.


> Initially I thought OrderedCollection. Order is important and will need 
> to be maintained either via the nature of the collection or by index.

MagmaCollection indexes keep things sorted, not the original order.  If order
is important, you'll need to assign your own sequence number to them and index
on that.  Of course, you can also have other indexes on keywords.

> I don't know when OrderedCollection or Dictionary begin to become 
> suboptimal, especially when used in Magma.

It may take some experimentation, but I would guess not to go beyond 2500-5000
entries for any Smalltalk collection you wish to put into Magma.

Hope this helps,
  Chris

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



More information about the Squeak-dev mailing list