Page MenuHomePhabricator

ve.dm.NodeAnnotationRange causes the uncached and slow ve.dm.Node#getOffset to be called many times
Closed, ResolvedPublic

Description

Example URL: https://en.wikipedia.org/w/index.php?title=List_of_islands_of_Maine&veaction=edit&ecenable=suggestions (warning may freeze browser)

ve.dm.NodeAnnotationRange makes annotation ranges relative to nodes so they don't have to be recomputed as often, however it also means we call the uncached and relative slow (10s of ms) ve.dm.Node#getOffset hundreds or thousands of times on long/complex pages.

Event Timeline

Change #1260692 had a related patch set uploaded (by Esanders; author: Esanders):

[VisualEditor/VisualEditor@master] Improve ve.dm.Node's offset cache with #getOrInsertCachedData

https://gerrit.wikimedia.org/r/1260692

Change #1260692 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Improve ve.dm.Node's offset cache with #getOrInsertCachedData

https://gerrit.wikimedia.org/r/1260692

Change #1260732 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (5d8d5ecdb)

https://gerrit.wikimedia.org/r/1260732

Change #1260732 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (5d8d5ecdb)

https://gerrit.wikimedia.org/r/1260732

DLynch added a project: Skipped QA.