Hi.
I think I have the workspace memory wasting problem again (my image file grew a couple of megabytes for no reason). What can I do to check? I tried self inspect over a workspace (from the menu), this led me to a stringHolder, which has a model which is a workspace. But inspecting a workspace leads to a huge byteArray... where are the local names in a workspace?
BTW, the speed of the FSMs got increased about threefold still in Smalltalk. This makes the overall improvement constant something about 70.
Andres.
Hi.
I think I have the workspace memory wasting problem again (my image file grew a couple of megabytes for no reason). What can I do to check? I tried self inspect over a workspace (from the menu), this led me to a stringHolder, which has a model which is a workspace. But inspecting a workspace leads to a huge byteArray... where are the local names in a workspace?
The Workspace includes a dictionary with the bindings. All your undeclared stuff can be found there. Try adding
Workspace>>releaseBindings bindings _ nil
and then:
Workspace allInstancesDo:[:workSpace| workSpace releaseBindings]. Smalltalk garbageCollect.
This should give you most of the space back (given that it's really the workspace bindings ;-)
Andreas
Andreas Raab wrote:
Hi.
I think I have the workspace memory wasting problem again (my image file grew a couple of megabytes for no reason). What can I do to check? I tried self inspect over a workspace (from the menu), this led me to a stringHolder, which has a model which is a workspace. But inspecting a workspace leads to a huge byteArray... where are the local names in a workspace?
The Workspace includes a dictionary with the bindings. All your undeclared stuff can be found there. Try adding
Workspace>>releaseBindings bindings _ nil
and then:
Workspace allInstancesDo:[:workSpace| workSpace releaseBindings]. Smalltalk garbageCollect.
This should give you most of the space back (given that it's really the workspace bindings ;-)
To reclaim image space open the System Transcript from the open menu (the same one you use to open browsers). The System Transcript has been loaded with lots of helpful bits of code. There are several that have to do with image space management. They are listed under the heading HouseCleaning.
Undeclared inspect. Smalltalk cleanOutUndeclared. (Object classPool at: #DependentsFields) inspect. Smalltalk reclaimDependents. Symbol rehash. Transcript clear. Smalltalk forgetDoIts.
I use these a lot because I am hacking at porting code and I don't have much of a clue as to what I am doing.
John-Reed
Andreas
To reclaim image space open the System Transcript from the open menu (the same one you use to open browsers). The System Transcript has been loaded with lots of helpful bits of code. There are several that have to do with image space management. They are listed under the heading HouseCleaning.
Undeclared inspect. Smalltalk cleanOutUndeclared. (Object classPool at: #DependentsFields) inspect. Smalltalk reclaimDependents. Symbol rehash. Transcript clear. Smalltalk forgetDoIts.
I use these a lot because I am hacking at porting code and I don't have much of a clue as to what I am doing.
F.Y.I...
1. I think you mean the System Workspace.
2. We eliminated the System Workspace in Squeak 2.0, in favor of the 'do...' editable menu.
3. You will find a lot of such handy expressions in SystemDictionary under the category 'housekeeping'. You may also find printSpaceAnalysis (in 'shrinking') useful.
- Dan
squeak-dev@lists.squeakfoundation.org