At present, most edit checks recheck the modified parts of the document repeatedly (roughly speaking, every time the document is updated). In suggestion mode they will recheck the whole document on the same basis. For a long article, with many checks operating, this will have an unacceptable performance impact, particularly on low-powered mobile devices.
The per-node cache from T415297 gives a way to avoid the vast majority of this rechecking in a typical edit scenario. It should be suitable for optimizing many of our existing checks.
Acceptance criteria
The following checks use the per-node cache:
-
Add referenceWon't rewrite for now, as there is complex logic present -
Convert referenceWon't rewrite for now, as it depends on the internal list, not the paragraph - Disambiguation
- External link
- Fake headings
-
Image captionWon't rewrite for now, as it applies on save only - Redirect
-
Required template paramsWon't rewrite for now, as it applies outside paragraphs -
ToneWon't rewrite for now, as it already uses its own custom caching (memoization) -
Text matchWon't rewrite for now, as there is complex logic present, and also some custom caching - Year link