[ENH] MorphicOptimizations-nk

Ned Konz ned at bike-nomad.com
Tue Mar 13 17:50:37 UTC 2001


from preamble:

"Change Set:		MorphicOptimizations-nk
Date:			13 March 2001
Author:			Ned Konz

This provides speedups in menu generation and
StringMorph creation and changing. It should improve
all Morphic text displays (browsers, etc.)

This resulted in a 36% speedup in TheWorldMenu>> alphabeticalMorphMenu

* Two duplicate
changed calls were removed from the critical path in
StringMorph>>contents:

* Morph>>invalidRect: was optimized to avoid calling invalidRect:from:

* wonderlandTexture calls were removed from Morph>>invalidRect:from:

THIS NEEDS TO EXAMINED; I REMOVED THESE:

self wonderlandTexture ifNotNil:[self isValidWonderlandTexture: false].

* StringMorph>>initialize defers setting its contents to 'String Morph'
until it actually gets an owner, eliminating an extra resize

* MenuMorph defers setting its properties until it has
a World to examine, so it doesn't have to search for a world

Speedups measured using:

Smalltalk garbageCollectMost. Time millisecondsToRun: [ TheWorldMenu
someInstance alphabeticalMorphMenu  ]

406 original time
365 after changes to invalidRect: and invalidRect:from:
343 after changes to StringMorph>>initialize
313 after changes to invalidRect: and invalidRect:from: removing
wonderlandTexture
290 after changes to menumorph defaults from world
278 after removing duplicate changed call after extent: in
StringMorph>>fitContents
258 after another duplicate changed call was removed in
StringMorph>>contents
"!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MorphicOptimizations-nk.cs.gz
Type: application/octet-stream
Size: 2063 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20010313/2c29a1d0/MorphicOptimizations-nk.cs.obj


More information about the Squeak-dev mailing list