Project memory usage
Last updated at 5:11 pm UTC on 27 September 2006
The following test gives a rough idea how much memory project object use minimally. The test is for for empty projects.
- Save your image and check image size.
- Generate with the following code snippet 1000 new Projects:
myProjDict _ Dictionary new.
1000 to: 1999 do: [ :i |
projname _ 'P' , i printString.
proj _ Project newMorphic.
myProjDict at: projname put: proj.
proj changeSet name: projname.
- It is necessary to keep the projects in an dictionary otherwise the garbage collector may destroy them. They have to be kept somewhere.
- Save your image again and check size. You see that a thousand projects use about 250kB of space. Actually 250 Bytes per project. Very little indeed.
Next task for anybody interested:
Generate 1000 projects, enter each project and add 100 RectangleMorphs and 100 TextMorphs.
Measure memory footprint
and post results here.