[squeak-dev] fascinating behavior when dealing with 574217 templates

gettimothy gettimothy at zoho.com
Tue Aug 27 22:59:50 UTC 2019


Hi all, posting to squeak-dev cause I think it will intrigue you.



I am importing 574217 Wikimedia templates into Squeak in an attempt to create a fast parser.



I have developed two approaches.



1. dynamically create a class for each template.

2. add a template wrapped in an abject and store that in a Class Instance Variable Dictionary. (I am storing objects in a class variable)





1. I prefer as I like the idea and I am curious about how many classes we can load into Squeak. I tried to load all 574217 classes at once, but it took too long. (and I had no user feedback, hence my question on progress bars)

   Therefore, I broke the task into 5000 record batches. Interestingly, as I do this, it starts out VERY fast, but with each new batch the performance degrades very fast.

   Its like the more subclasses of a class I add, the harder it gets to add them.





2. I do not like the idea of storing objects in a Class Instance Variable. Why? Putting objects in a Class feels like a gravy stain on my best t-shirt.

    However, loading all 574217 objects finished within 1 5000 class load batch run.



Why? I have no idea. Figured you all would find the phenomenon interesting.



The generic questions of "How many classes can we hold in an image" and "How quickly can we create them" are interesting things in themselves. Squeak Classes are very much like a Database/SQL environment and easy to work with. 



Cheers.



tty
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190827/c4d92845/attachment.html>


More information about the Squeak-dev mailing list