[squeak-dev] The Inbox: Morphic-ct.2082.mcz

Taeumel, Marcel Marcel.Taeumel at hpi.de
Mon Jan 30 10:06:24 UTC 2023


Hi Christoph, hi all --

Hmm... I would rather not sacrifice performance for a little bit less flickering. I would not want to have sluggish systems that appear calm but actually slow you down.

I think that it is not expedient to modify (and break) snappy things like LazyListMorph but rather write a new list widget that might replace the current one. Then, we can avoid having an intermediate state without a way to go back or forth, depending on the situation.

Best,
Marcel

Am 28.01.2023 20:58:16 schrieb commits at source.squeak.org <commits at source.squeak.org>:

Christoph Thiede uploaded a new version of Morphic to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.2082.mcz

==================== Summary ====================

Name: Morphic-ct.2082
Author: ct
Time: 28 January 2023, 8:57:55.639628 pm
UUID: dfcaa928-8758-5a42-a55b-2d89712a2a86
Ancestors: Morphic-mt.2081

To review: Fixes flickering in multi-column lists by ensuring sufficiently stable computation in #maxWidth.

This is likely to have a small but noticable negative impact on the performance for large lists, but I think this is inevitable if we want to avoid flickering. Otherwise, we could only consider computing the layout completely lazily during drawing.

For instance, the original bug can be reproduced by loading the SimulationMethodFinder from SimulationStudio, doing Morph new exploreProtocol and scrolling down until methodCommentAsBalloonHelp comes into view.

=============== Diff against Morphic-mt.2081 ===============

Item was changed:
----- Method: LazyListMorph>>maxWidth (in category 'layout') -----
maxWidth
+ "Approximate the maximum width of this lazy list. Take all visible items as a sample.
+
+ NOTE that we MUST compute the width for all items in view!! Otherwise, maxWidth might be instable and be increased again during drawing in #item:, causing the receiver to flicker after each #layoutChanged (e.g., from PluggableMultiColumnListMorph>>#updateColumns)."
- "Approximate the maximum width of this lazy list. Take first n items as a sample."

+ | listSize visibleBounds topRow bottomRow |
+ maxWidth ifNotNil: [^maxWidth].
+
- | threshold listSize |
- maxWidth ifNotNil:[^maxWidth].
-
- threshold := 30.
listSize := self getListSize.

+ visibleBounds := self bounds: self owner bounds from: self owner.
+ topRow := self rowAtLocation: visibleBounds topLeft.
+ bottomRow := self rowAtLocation: visibleBounds bottomLeft.
+
maxWidth := 0.
+ topRow to: bottomRow do: [:index |
- 1 to: (threshold min: listSize) do: [:index |
maxWidth := maxWidth max: (self widthToDisplayItem: (self getListItem: index))].
+
+ ^ maxWidth!
-
- ^ maxWidth
- !


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20230130/c5070d6b/attachment.html>


More information about the Squeak-dev mailing list