fascinating behavior when dealing with 574217 templates

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
tty
Reply | Threaded
Open this post in threaded view
|

fascinating behavior when dealing with 574217 templates

tty
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




_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
tty
Reply | Threaded
Open this post in threaded view
|

Re: fascinating behavior when dealing with 574217 templates

tty
Well, it bombed.

I got to 50,000 classes created dynamically. Did a save and quit. restarted
the image and simple doits like 'Smalltalk garbageCollect'  cause the image
to crash.


A bit disappointing as I hoping I could push this to half a million new
classes.





--
Sent from: http://forum.world.st/Squeak-Beginners-f107673.html
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners