[go: up one dir, main page]

Page MenuHomePhabricator

TemplateStyles make rendering references previews very slow on large articles
Closed, ResolvedPublic

Description

image.png (182×440 px, 42 KB)

Event Timeline

The time here is spent with recalculating styles, and experimenting this appears to be the TemplateStyles <style> tag. Stripping these style tags from the preview solves the performance issue.

I think the extra <style> tag is often unnecessary because the styles are already included in the main document.

There may be other places that are being slow because of this?

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

[VisualEditor/VisualEditor@master] PreviewElement: Add a #beforeAppend method so nodes can be modified

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

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

[mediawiki/extensions/VisualEditor@master] MWPreviewElement: Strip already-present TemplateStyles when building elements

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

Change 893038 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] PreviewElement: Add a #beforeAppend method so nodes can be modified

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

Change 897959 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

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

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

Change 897959 merged by jenkins-bot:

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

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

Change 893039 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] MWPreviewElement: Strip already-present TemplateStyles when building elements

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

It takes about a second or 2 now. That's an improvement but is the target here milliseconds?

EAkinloose claimed this task.
EAkinloose edited projects, added Verified; removed Editing QA.