[Glass] How to manage large amounts of data ...

Dale Henrichs dale.henrichs at gemtalksystems.com
Thu Aug 14 08:55:48 PDT 2014


Marten,

I would say that Jame's suggestion is correct ... a dictionary is used for
identity-based indexes .

You probably should use an IdentityKeyValueDictionary for quick access, but
you will want to keep an eye on the size of the collision buckets in the
dictionary ... when you hit the collision bucket limit on an at:put: the
dictionary is immediately rebuilt, which can cause an unreasonable delay
... with a large dictionary you would probably want to rebuild the
dictionary during off hours ...

IdentitySet would be an even better bet (no collision buckets combined with
quick identity based lookups) but to be able to use the UUID for lookup
you'd need to store the uuid in the identitySet ... but if you could
arrange for the uuid to reference the object directly an identity set would
work ...

Dale


On Thu, Aug 14, 2014 at 7:01 AM, itlists at schrievkrom.de <
itlists at schrievkrom.de> wrote:

> Assuming I have a large number of objects with a unique key attribute
> (uuid based).
>
> Normally I use an instance of class Dictionary (or perhaps better:
> StringKeyValueDictionary) to store instances of these objects. The
> initial finding access to these objects are mostly done via its unique
> key attribute.
>
> So the access to an instance was pretty fast:
>
>  ^aDictionary at: aKey ifAbsent: [ nil ]
>
> But what happens, if this dictionary is getting very large (say: a
> million of entries) ?
>
> Is is better to have a different approach then: e.g. a collection with a
> defined index on that unique attribute ?
>
>
> Thanks for answering ...
>
> Marten
>
>
> --
> Marten Feldtmann
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20140814/d6f3ffef/attachment.html>


More information about the Glass mailing list