LearnNewsExamplesServices
Frontmatter
id5529
titlevdom.Helper: createDeltas() => support for infinite scrolling is broken
stateClosed
labels
bug
assigneestobiu
createdAtJul 4, 2024, 10:51 PM
updatedAtJul 4, 2024, 10:52 PM
githubUrlhttps://github.com/neomjs/neo/issues/5529
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJul 4, 2024, 10:52 PM

vdom.Helper: createDeltas() => support for infinite scrolling is broken

Closed v8.1.0 bug
tobiu
tobiu commented on Jul 4, 2024, 10:51 PM

It took me many hours to figure this one out.

The bug is related to introducing flat maps for reducing the amount of tree parsings.

However, there are a couple of spots (inserting, moving or removing an item from an array), where we did modify the old vnode tree. fair game, since it will get deleted anyway.

As a result, the indexes & items inside the old flat map were no longer fully in sync.

Changing the indexes inside a map feels expensive: getting a node & parent node is easy, but for getting all items of the same parent, we need to walk through the entire map.

So, for now, I just recreated the old map for those edge-cases. Should be roughly the same performance-wise.

tobiu added the bug label on Jul 4, 2024, 10:51 PM
tobiu assigned to @tobiu on Jul 4, 2024, 10:51 PM
tobiu referenced in commit a08f7e5 - "vdom.Helper: createDeltas() => support for infinite scrolling is broken #5529" on Jul 4, 2024, 10:52 PM
tobiu closed this issue on Jul 4, 2024, 10:52 PM