[ENH] MorphicOptimizations-nk (fix)

Ned Konz ned at bike-nomad.com
Thu Mar 15 20:29:02 UTC 2001


This version
fixes updating in UpdatingStringMorph
when extent is same as prior extent.

from preamble:

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

15 March: fixed updating in UpdatingStringMorph
when extent is same as prior extent.

14 March: fixed display properties of submenus

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: 2573 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20010315/5e6e246e/MorphicOptimizations-nk.cs.obj


More information about the Squeak-dev mailing list