automatically expand the current children node#3185
Conversation
veloce
left a comment
There was a problem hiding this comment.
I'm ok in principle for the feature and implementation.
But see comment: it should only be applied if not fast seeking the game.
Also since the asked change would complexity a bit the logic I'd like to have 2 simples tests for this: one that shows it does not expand when fast seeking, and one that shows it does for simple move jump.
Thanks!
| // recompute the root view only when the nodelist length changes | ||
| // or a variation is hidden/shown | ||
| final rootView = shouldForceShowVariation || shouldRecomputeRootView | ||
| final rootView = shouldForceShowVariation || shouldRecomputeRootView || pathWasExpanded |
There was a problem hiding this comment.
Recomputing rootView is expensive. Are you sure about the performance implications? Seems like it would impact the fast forward/rewind feature.
IMO this should be disabled if fast forward/rewind and only apply to a single jump.
|
I found two cases where nodes are automatically collapsed: mobile/lib/src/model/common/node.dart Line 558 in 249010c and So I am wondering if we need the fast-forward logic: It might be a problem for the second case, as direct children of the mainline nodes are collapsed. But this is actually very niche: people requesting a server analysis and then long-pressing through it. A game that is reopened would not have them collapsed because it would use the logic from the first case. Also a normal game would be very light to compute the So the one possible problem I can see is for huge studies. After requesting a computer analysis, those lines are collapsed and then the user fast-navigates through the moves, The only other possibility where this problem appears is when a user manually collapses a lot of variations in a huge study, but tbh this also seems very unlikely. I think these cases are too rare to deserve their own handling logic in the code. What do you think, @veloce? |
94dd1c3 to
02cd011
Compare
Automatically expand the children of the currentNode, closes #2494
The perf impact is negligible, as only the current children get looped.
Screencast_20260514_173011.webm
I implemented for studies and analysis, I do not see a reason to do it for broadcasts.