Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.2111.mcz
==================== Summary ====================
Name: Morphic-mt.2111 Author: mt Time: 9 June 2023, 1:47:47.479748 pm UUID: cf52a53c-27bd-d74a-a198-a2de98ad0e7a Ancestors: Morphic-mt.2110
Prepare update that speeds up tree widgets having thousands of items.
=============== Diff against Morphic-mt.2110 ===============
Item was added: + ----- Method: SimpleHierarchicalListMorph>>drawVisibleItemsOn: (in category 'drawing') ----- + drawVisibleItemsOn: aCanvas + + aCanvas + transformBy: scroller transform + clippingTo: scroller innerBounds + during: [ :clippedCanvas | | lColor | + + self drawHoverOn: clippedCanvas. + self drawSelectionOn: clippedCanvas. + + lColor := self lineColor. + self flag: #todo. "mt: Optimize line drawing to finish after a single enumeration of visible morphs." + self visibleItemsDo: [:m | m drawLinesOn: clippedCanvas lineColor: lColor indentThreshold: 0]. + self visibleItemsDo: [:m | clippedCanvas fullDrawMorph: m]] + smoothing: scroller smoothing. + + !
Item was added: + ----- Method: SimpleHierarchicalListMorph>>minItemHeight (in category 'geometry') ----- + minItemHeight + "Answer the minimum height of each item. For uniform lists, this is the definite height of all items. See #minHeight in IndentingListItemMorph." + + ^ scroller hasSubmorphs + ifTrue: [scroller firstSubmorph height] + ifFalse: [self font lineGridForMorphs] + !
Item was added: + ----- Method: SimpleHierarchicalListMorph>>visibleItemsDo: (in category 'drawing') ----- + visibleItemsDo: block + "Enumerate all visible items, which is more efficient that just #submorphsDo: for scrollers that have thousands of items but typically only dozens visible on screen." + + | items numItems maxY row item | + items := scroller submorphs. + (numItems := items size) = 0 ifTrue: [^ self]. + + row := ((scroller offset y max: 0) // self minItemHeight) + 1. + maxY := scroller offset y + scroller height. + [row <= numItems and: [(item := items at: row) top < maxY]] whileTrue: [ + item visible ifTrue: [block value: item]. + row := row + 1].!
squeak-dev@lists.squeakfoundation.org