Dev image slowdowns

Norbert Hartl norbert at hartl.name
Thu Sep 20 20:10:13 UTC 2007


On Thu, 2007-09-20 at 08:59 -0600, Brian Brown wrote:
> Hello list,
> 
> I've been using Damien's dev images, and specifically the beta-web  
> (sq3.10-7121web07.07.01, although it has been upgraded), and I've  
> noticed that it has been getting slower over time. By "slower", I  
> mean the responsiveness of the tools. I have to click multiple times  
> to select items in OmniBrowser or in the Debug windows. My web  
> application is still as speedy as ever, so it doesn't seem like a  
> general slowdown.
> 
> I'm not using Dynamic Protocols, because they were very slow, but  
> after turning them off, the image was very responsive.
> 
> I recall someone mentioning in passing a cache somewhere that could  
> be cleaned out, but I can't remember enough to search successfully  
> for the reference :)
> 
> 
Hi, you need to cleanup from time to time. I'm no expert on this topic
but collected some lines which might help. The first is a collection
of cleanup tasks. I think I stole it from Ramon.

garbageCollect
 | tasks |
 tasks := OrderedCollection new
    add: [MCFileBasedRepository flushAllCaches];
    add: [WARegistry clearAllHandlers];
    add: [SMSqueakMap default clearCaches];
    add: [Smalltalk removeEmptyMessageCategories];
    add: [Workspace
      allSubInstancesDo: [:each | each setBindings: Dictionary new]];
    add: [Undeclared removeUnreferencedKeys];
    add: [Categorizer sortAllCategories];
    add: ["add: [ODBCConnection cleanAll];"
     Symbol compactSymbolTable];
    add: [ReleaseBuilderDeveloper new fixObsoleteReferences];
    add: [Smalltalk garbageCollectMost];
     yourself.
 Utilities
  informUserDuring: [:bar | tasks
    do: [:block |
     bar value: block printString.
     [block value]
      on: Error
      do: [:error | Transcript show: error;
         cr]]].
 SystemNavigation default obsoleteClasses isEmpty
  ifTrue: [SmalltalkImage current saveSession]
  ifFalse: [SystemNavigation default obsoleteClasses
    do: [:each | [PointerFinder on: each]
      on: Error
      do: [:error | Transcript show: error;
         cr]]]

If you have a big image it could use some time to complete.

Working with the dev-image I discovered some problems with a slow image.
I collected some measures using the pointer finder. I don't know if
they are doing any harm but they help :)

Dialect reset.   "I'm using Glorp"
RequiredSelectors initialize.
DPAbstract allSubclasses do: [:each| each invalidateCache].
TestResultTimed resetLastResults.
EventManager actionMaps keys do: [:each| EventManager
releaseActionMapFor: each].

It is a good idea to invoke those before using the garbageCollect task.

Hope this helps.,

Norbert




More information about the Squeak-dev mailing list