[Glass] UUID new is pretty slow ...

Dale Henrichs via Glass glass at lists.gemtalksystems.com
Wed Jul 1 09:18:36 PDT 2015


Martin,

Great! ... I've started looking into incorporating your implementation 
into the standard GsDevKit/GLASS code base.

Dale

On 06/30/2015 01:12 PM, Martin McClure via Glass wrote:
> On 06/30/2015 07:53 AM, itlists at schrievkrom.de via Glass wrote:
>> ... I was not aware of it. I created 11000 objects from a CSV file and
>> to get IDs within these objects I use the UUID class of Gemstone.
>>
>>   It took very long and I found out, that the creation of the 11000
>> objects took pretty long ... until I found, that "UUID new" was the
>> reason for that. It is very expensive. Calling this method 11000 times
>> took 5.1s (average).
>>
>>   I now use native libraries from Linux and now creating 11000 UUIDs
>> takes around 0.3 to 0.5 seconds.
>>
> I think the current GemStone implementation of UUID generation was taken
> from Squeak a number of years ago. I took a look at how it's
> implemented, and it's done just about the slowest way imaginable. So I
> made a simpler, faster implementation. I believe it's compatible with
> the existing implementation, just faster. Attached is a replacement for
> the class UUIDGenerator that is almost 100x faster -- I can generate
> 11000 UUIDs in about 0.02 seconds with pure Smalltalk, so it might be
> even faster than using native libraries.
>
> This was done on the latest unreleased GemStone, but will probably work
> in any 3.x version. If you try it, let me know what results you get.
>
> Regards,
>
> -Martin
>
>
> _______________________________________________
> 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/20150701/a3591555/attachment-0001.html>


More information about the Glass mailing list