[Newbies] Saving the image during import and dynamic creation of ~ 1/2 million classes.

gettimothy gettimothy at zoho.com
Mon Aug 26 19:46:54 UTC 2019


Hi all.





I am on a bit of a kick where I dynamically create classes and have them render themselves. For example at http://menmachinesmaterials.com/SeasideDoc


 



On the left menu under SWIKI, I have scraped the Squeak Wiki pages, dynamically created WAComponent subclasses that wrap their data and I ask them to display themselves on the web page.

IIRC there are about 6000 Swiki pages/classes there.*


Its a nice model with a lot of power and possibilities.





I am on a different project where I am doing something very similar, but this time there are ~570000 classes to create.



Herein my question.



As I import these things, should I and how often should I use Smalltalk saveSession; garbageCollect. ?



My thinking is that as I create these things, they are held in "Smalltalk memory" whatever that is and that as the amount of stuff in "Smalltalk Memory" increases, performance drops and eventually you hit the limit of what "Smalltalk Memory" can do.



So, to mitigate this perhaps imaginary limitation, I am doing a Smalltalk saveSession; garbageCollect every 5000 classes created.



Is this the correct thing to do? What misperceptions may I be harboring?



Thanks in advance.



tty
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/beginners/attachments/20190826/1474a547/attachment.html>


More information about the Beginners mailing list