Speeding up the Browser

Lex Spoon lex at cc.gatech.edu
Sun Sep 8 15:19:22 UTC 2002


"Eddie Cottongim" <cottonsqueak at earthlink.net> wrote:

> I did a message tally while clicking between 'Morph' and 'HandMorph'
> repeatedly, which you can see below. It looks like most of the time is being
> spent populating PluggableListMorphs with items. I think the problem must be
> at or below:
> --   55.6% {11800ms}
> PluggableMessageCategoryListMorph(PluggableListMorph)>>list:

Ah, if it's the UI bogging down on large lists, then my LargeLists patch
might fix this up....  It avoids calculating string sizes for all of the
entries in the list.  You just load the patch and get this benefit -- no
tweaking of Browser is necessary.  (LargeLists also has an alternative
way to specify the strings; the model can supply individual elements
instead of having to supply the entire list.  This is a big saving in
Celeste, where even *calculating* the lines is expensive.)

Okay, with LargeLists, it still seems It still seems a little sluggish
to me, but it no longer matters how many items are in the list.  Morph
and HandMorphForReplay are selected equally fast.


-Lex


====  selecting Morph and HandMorphForReplay under LargeLists =====

 - 2014 tallies, 34913 msec.

**Tree**
100.0% {34913ms} PasteUpMorph>>doOneCycle
  100.0% {34913ms} WorldState>>doOneCycleFor:
    92.9% {32434ms} WorldState>>doOneCycleNowFor:
      |89.3% {31177ms} HandMorph>>processEvents
      |  89.1% {31107ms} HandMorph>>handleEvent:
      |    87.3% {30479ms} HandMorph>>sendKeyboardEvent:
      |      87.3% {30479ms} HandMorph>>sendEvent:focus:clear:
      |        87.3% {30479ms} HandMorph>>sendFocusEvent:to:clear:
      |          87.3% {30479ms} PluggableListMorph(Morph)>>handleFocusEvent:
      |            87.3% {30479ms} PluggableListMorph(Morph)>>handleEvent:
      |              87.3% {30479ms} KeyboardEvent>>sentTo:
      |                87.3% {30479ms} PluggableListMorph(Morph)>>handleKeystroke:
      |                  87.3% {30479ms} PluggableListMorph>>keyStroke:
      |                    87.3% {30479ms} PluggableListMorph>>specialKeyPressed:
      |                      86.7% {30270ms} PluggableListMorph>>changeModelSelection:
      |                        86.7% {30270ms} Browser>>classListIndex:
      |                          42.9% {14978ms} Browser(Object)>>changed:
[21.9% {7646ms} SystemWindow>>update:
[  |21.4% {7471ms} Browser>>labelString
[  |  21.4% {7471ms} Browser>>selectedClass
[  |    19.8% {6913ms} VirtualRootModule>>allDefinitionsFor:onlyExported:detect:
[  |      18.0% {6284ms} VirtualRootModule(Module)>>deepSubAndDeltaModules
[  |        14.2% {4958ms} Module>>deltaModules
[  |          |9.6% {3352ms} Module>>neighborModules
[  |          |  |8.8% {3072ms} Array(Collection)>>select:thenCollect:
[  |          |  |  6.8% {2374ms} Array(SequenceableCollection)>>select:
[  |          |  |    2.7% {943ms} Array(SequenceableCollection)>>at:
[  |          |  |      2.1% {733ms} primitives
[  |          |4.4% {1536ms} Array(SequenceableCollection)>>select:
[  |        2.9% {1012ms} VirtualRootModule(Module)>>deepSubmodulesDo:
[  |          2.9% {1012ms} Module>>deepSubmodulesDo:
[  |            2.7% {943ms} Module>>deepSubmodulesDo:
[  |              2.5% {873ms} Module>>deepSubmodulesDo:
[20.8% {7262ms} PluggableListMorph>>update:
[  20.1% {7018ms} PluggableListMorph>>updateList
[    9.7% {3387ms} LazyListMorph>>listChanged
[      |9.4% {3282ms} LazyListMorph>>getListSize
[      |  9.4% {3282ms} PluggableListMorph>>getListSize
[      |    9.4% {3282ms} PluggableListMorph>>getList
[      |      8.8% {3072ms} Browser>>messageList
[      |        8.8% {3072ms} ClassOrganizer>>allMethodSelectors
[      |          8.8% {3072ms} Array(ArrayedCollection)>>sort
[      |            5.1% {1781ms} Array(ArrayedCollection)>>sort:
[      |              |5.1% {1781ms} Array(ArrayedCollection)>>mergeSortFrom:to:by:
[      |              |  5.1% {1781ms} Array(ArrayedCollection)>>mergeSortFrom:to:src:dst:by:
[      |              |    4.7% {1641ms} Array(ArrayedCollection)>>mergeSortFrom:to:src:dst:by:
[      |              |      4.3% {1501ms} Array(ArrayedCollection)>>mergeSortFrom:to:src:dst:by:
[      |              |        3.7% {1292ms} Array(ArrayedCollection)>>mergeSortFrom:to:src:dst:by:
[      |              |          3.2% {1117ms} Array(ArrayedCollection)>>mergeSortFrom:to:src:dst:by:
[      |              |            2.7% {943ms} Array(ArrayedCollection)>>mergeSortFrom:to:src:dst:by:
[[2.1% {733ms} Array(ArrayedCollection)>>mergeSortFrom:to:src:dst:by:
[      |            2.3% {803ms} Symbol(String)>><=
[    9.6% {3352ms} PluggableListMorph>>selectionIndex:
[      9.5% {3317ms} PluggableListMorph>>getListSize
[        9.5% {3317ms} PluggableListMorph>>getList
[          9.2% {3212ms} Browser>>messageList
[            9.0% {3142ms} ClassOrganizer>>allMethodSelectors
[              9.0% {3142ms} Array(ArrayedCollection)>>sort
[                5.6% {1955ms} Array(ArrayedCollection)>>sort:
[                  |5.6% {1955ms} Array(ArrayedCollection)>>mergeSortFrom:to:by:
[                  |  5.6% {1955ms} Array(ArrayedCollection)>>mergeSortFrom:to:src:dst:by:
[                  |    5.2% {1815ms} Array(ArrayedCollection)>>mergeSortFrom:to:src:dst:by:
[                  |      4.6% {1606ms} Array(ArrayedCollection)>>mergeSortFrom:to:src:dst:by:
[                  |        4.0% {1397ms} Array(ArrayedCollection)>>mergeSortFrom:to:src:dst:by:
[                  |          3.7% {1292ms} Array(ArrayedCollection)>>mergeSortFrom:to:src:dst:by:
[                  |            3.2% {1117ms} Array(ArrayedCollection)>>mergeSortFrom:to:src:dst:by:
[                  |              2.7% {943ms} Array(ArrayedCollection)>>mergeSortFrom:to:src:dst:by:
[[2.6% {908ms} Array(ArrayedCollection)>>mergeSortFrom:to:src:dst:by:
[                2.6% {908ms} Symbol(String)>><=
      |                          21.1% {7367ms} Browser>>selectedClass
[19.8% {6913ms} VirtualRootModule>>allDefinitionsFor:onlyExported:detect:
[  18.3% {6389ms} VirtualRootModule(Module)>>deepSubAndDeltaModules
[    14.8% {5167ms} Module>>deltaModules
[      |10.1% {3526ms} Module>>neighborModules
[      |  |9.5% {3317ms} Array(Collection)>>select:thenCollect:
[      |  |  7.3% {2549ms} Array(SequenceableCollection)>>select:
[      |  |    |3.5% {1222ms} Array(SequenceableCollection)>>at:
[      |  |    |  2.6% {908ms} primitives
[      |  |  2.1% {733ms} Array(SequenceableCollection)>>collect:
[      |4.5% {1571ms} Array(SequenceableCollection)>>select:
[    2.9% {1012ms} VirtualRootModule(Module)>>deepSubmodulesDo:
[      2.8% {978ms} Module>>deepSubmodulesDo:
[        2.8% {978ms} Module>>deepSubmodulesDo:
[          2.5% {873ms} Module>>deepSubmodulesDo:
      |                          12.0% {4190ms} Browser(CodeHolder)>>contentsChanged
[11.9% {4155ms} Browser(Object)>>contentsChanged
[  11.9% {4155ms} Browser(Object)>>changed:
[    11.9% {4155ms} PluggableTextMorph>>update:
[      10.8% {3771ms} PluggableTextMorph>>getText
[        10.8% {3771ms} Browser>>contents
[          10.6% {3701ms} Browser>>selectedClassOrMetaClass
[            10.6% {3701ms} Browser>>selectedClass
[              10.0% {3491ms} VirtualRootModule>>allDefinitionsFor:onlyExported:detect:
[                9.0% {3142ms} VirtualRootModule(Module)>>deepSubAndDeltaModules
[                  7.1% {2479ms} Module>>deltaModules
[                    5.1% {1781ms} Module>>neighborModules
[                      4.8% {1676ms} Array(Collection)>>select:thenCollect:
[                        3.3% {1152ms} Array(SequenceableCollection)>>select:
      |                          10.8% {3771ms} Browser>>setClassOrganizer
[10.8% {3771ms} Browser>>selectedClass
[  10.3% {3596ms} VirtualRootModule>>allDefinitionsFor:onlyExported:detect:
[    9.3% {3247ms} VirtualRootModule(Module)>>deepSubAndDeltaModules
[      7.1% {2479ms} VirtualRootModule(Module)>>deltaModules
[        4.8% {1676ms} VirtualRootModule(Module)>>neighborModules
[          |4.4% {1536ms} Array(Collection)>>select:thenCollect:
[          |  2.8% {978ms} Array(SequenceableCollection)>>select:
[        2.2% {768ms} Array(SequenceableCollection)>>select:
    7.1% {2479ms} WorldState>>interCyclePause:
      7.1% {2479ms} Delay>>wait

**Leaves**
28.5% {9950ms} Array(SequenceableCollection)>>at:
8.6% {3003ms} SmallInteger(Magnitude)>>between:and:
7.1% {2479ms} Delay>>wait
5.8% {2025ms} Array(SequenceableCollection)>>select:
5.2% {1815ms} Symbol(String)>><=
3.0% {1047ms} Array(SequenceableCollection)>>collect:
2.9% {1012ms} Array(SequenceableCollection)>>copyFrom:to:
2.7% {943ms} Array(SequenceableCollection)>>do:
2.3% {803ms} Array(ArrayedCollection)>>sort
2.2% {768ms} WriteStream>>nextPut:

**Memory**
	old			+127,264 bytes
	young		+69,612 bytes
	used		+196,876 bytes
	free		-196,876 bytes

**GCs**
	full			0 totalling 0ms (0.0% uptime)
	incr		1569 totalling 2,080ms (6.0% uptime), avg 1.0ms
	tenures		2 (avg 785 GCs/tenure)
	root table	0 overflows



More information about the Squeak-dev mailing list