Page MenuHomePhabricator

[Spike] Investigate refining ve.dm.DocumentModel data cache to support partial invalidation by branch node
Open, Needs TriagePublic

Description

Currently, documentModel#cachedData gets emptied on every transaction. But for some uses, it would be helpful to cache data pertaining to a particular branch node (e.g. data derived from analyzing a certain paragraph). That cached data would be cleared only when a transaction modifies that branch node.

This could escape performance bottlenecks in a variety of uses, including Edit Suggestions that query data on every paragraph.

Event Timeline

ppelberg subscribed.

@dchan: I'm boldly moving this to the backlog assuming (perhaps inaccurately!) that this work is not immediately relevant to the goals we've set.

Of course, please share if/how you think the above is misguided.

Change #1240003 had a related patch set uploaded (by Divec; author: Divec):

[VisualEditor/VisualEditor@master] WIP: Per-node cache that gets invalidated by relevant transactions only

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

Change #1244785 had a related patch set uploaded (by Divec; author: Divec):

[VisualEditor/VisualEditor@master] WIP: Refactor ve.dm.BranchNode#getAnnotationRanges to use per-node cache

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