Page MenuHomePhabricator

Re-duplicating TemplateStyles slows down rendering
Open, Needs TriagePublic

Description

We re-duplicate TemplateStyles to ensure we can render individual sections (for section editing on mobile), but this also means creating hundreds of non-empty style tags in things like a <references> list rendering, where each item has TemplateStyles from e.g. {{cite web}}.

Testing on a large-ish article ([[Argentina]]) total time spent rendering goes from ~1250ms to ~1600ms with all the extra <style> tags.

Event Timeline

I guess we could track, for each transclusion and extension node, which TemplateStyles they would include, remove them from each node, and then add/remove just a single copy of them somewhere outside the edit surface?

matmarex moved this task from Untriaged to Next Quarter on the Editing-team board.
matmarex moved this task from To Triage to Triaged on the VisualEditor board.