MagmaPreallocatedDictionary

Chris Muller asqueaker at gmail.com
Mon Dec 13 03:51:05 UTC 2010


Hi Facu, with standard Smalltalk collections there is just one
"Buffer" for the whole Collection object, so every time an element is
added, the "whole object" is changed and it writes a new buffer out.
So one-million elements might be an issue unless it is all built
up-front and not updated much anymore, since concurrent updates to a
single object also results in a commit-conflict, which you don't get
if you use a MagmaCollection or MagmaPreallocatedDictionary.

Also don't forget it is perfectly reasonable to make as many
object-pointers as you need even to the same objects; this is where
ODBMS's excel.  So you can have more than one collection with the same
objects.  So use the best collection for the job in each case.  If you
need to "find customers by names" then I would, in fact, use a
MagmaCollection with a index on name.  If you need the high-speed
single-object access, you should also put the same objects into the
MagmaPreallocatedDictionary.

 - Chris


On Sun, Dec 12, 2010 at 2:48 PM, Facundo Vozzi <facundov79 at gmail.com> wrote:
> I change MagmaPreallocatedDictionary to standard Dictionary and all seem
> works fine again because I need (for one report) find customers by names.
> What do you think about smalltalk standard dictionary persistent on Magma?
> Did you think about a Dictionary (MagmaDictionary?) with its values on a
> MagmaCollection so we would get access by hashed key or by an index on its
> values?
> See you,
> Facu
>
>
>
> On Sun, Dec 12, 2010 at 12:35 AM, Facundo Vozzi <facundov79 at gmail.com>
> wrote:
>>
>> Hi Chris, list,
>> how can I do to send #select: to a MagmaPreallocatedDictionary?
>> Thanks,
>> Facu
>
> _______________________________________________
> Magma mailing list
> Magma at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/magma
>
>


More information about the Magma mailing list