Page MenuHomePhabricator

Trigger ParsoidCachePrewarmJob on page views
Closed, ResolvedPublic


A ParsoidCachePrewarmJob should be triggered when viewing a page that doesn't have cached parsoid output.

To ensure that we can open VisualEditor quickly, we need to have pre-rendered HTML in the ParserCache. Since we currently do not pre-generate it from RefreshLinksJob (see T327162), we need a different opportunity to do so.

When a user requests a page that does not have "normal" parser output cached, we will render the page on the fly, while the user is waiting. This will happen if the rendering was pruned from the parser cache because it was old, or when the entry has become invalid per RefreshLinksJob. at this time, we should also trigger a ParsoidCachePrewarmJob . This gives parsoid a chance to generate the HTML while the user is reading, so it is ready when the user opens the editor.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
daniel triaged this task as Medium priority.Jan 17 2023, 1:59 PM
daniel moved this task from Unsorted to Parsoid pile on the RESTBase Sunsetting board.

Change 882601 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] Parsoid: trigger cache warming on page view

Change 882601 merged by jenkins-bot:

[mediawiki/core@master] Parsoid: trigger cache warming on page view

Note that this feature is currently disabled by a feature flag, the WarmParsoidParserCache in the wgParsoidCacheConfig setting.

this was merged a long time ago and seems to be working in production (we can see the parser cache writes on the passive data center).