Page MenuHomePhabricator

Lazy loading of data-mw and data-parsoid
Closed, ResolvedPublic

Description

Output Transform Pipeline convert the parsercache HTML string to a DOM. In the process, they currently load data-mw & data-parsoid attributes (which involves converting the string attributes to JSON and then to native classes). This is unnecessary and wasteful since most OTP stages only inspect a small number of nodes and their data-parsoid & data-mw properties.

To improve performance, we need lazy loading of data-parsoid & data-mw properties, especially in post-cache transforms like OTP.

Event Timeline

Change #1204733 had a related patch set uploaded (by Subramanya Sastry; author: Subramanya Sastry):

[mediawiki/services/parsoid@master] WIP: lazy data-mw & data-parsoid

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

ssastry triaged this task as High priority.
ssastry updated Other Assignee, removed: ssastry.
ssastry updated the task description. (Show Details)

Change #1204733 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Implement lazy loading of data-mw and data-parsoid attributes

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

Change #1228553 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.23.0-a12

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

Change #1228553 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.23.0-a12

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

data-parsoid lazy loading patches are done and are being deployed. I am going to move this back to 'In Progress' for the WIP patches for lazy loading of data-mw.

Change #1227890 had a related patch set uploaded (by Subramanya Sastry; author: Subramanya Sastry):

[mediawiki/services/parsoid@master] WIP: Make loading truly lazy

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

Change #1227890 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Make DOM data attribute loading fully lazy when counters are available

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

Change #1285896 had a related patch set uploaded (by Subramanya Sastry; author: Subramanya Sastry):

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.24.0-a3

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

Change #1285896 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.24.0-a3

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

Change #1286484 had a related patch set uploaded (by C. Scott Ananian; author: Subramanya Sastry):

[mediawiki/vendor@wmf/1.47.0-wmf.2] Bump wikimedia/parsoid to 0.24.0-a3

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

Change #1286484 merged by jenkins-bot:

[mediawiki/vendor@wmf/1.47.0-wmf.2] Bump wikimedia/parsoid to 0.24.0-a3

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

Mentioned in SAL (#wikimedia-operations) [2026-05-12T21:05:01Z] <cscott@deploy1003> Started scap sync-world: Backport for [[gerrit:1286484|Bump wikimedia/parsoid to 0.24.0-a3 (T409751 T420336 T425981)]], [[gerrit:1286485|Bump wikimedia/parsoid to 0.24.0-a3 (T425981)]], [[gerrit:1286488|Disable unit tests that fail with new vendor release]], [[gerrit:1286489|Skip ContentHolderTest that fails with new vendor release]]

Mentioned in SAL (#wikimedia-operations) [2026-05-12T21:06:56Z] <cscott@deploy1003> cscott: Backport for [[gerrit:1286484|Bump wikimedia/parsoid to 0.24.0-a3 (T409751 T420336 T425981)]], [[gerrit:1286485|Bump wikimedia/parsoid to 0.24.0-a3 (T425981)]], [[gerrit:1286488|Disable unit tests that fail with new vendor release]], [[gerrit:1286489|Skip ContentHolderTest that fails with new vendor release]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Change

Mentioned in SAL (#wikimedia-operations) [2026-05-12T21:19:53Z] <cscott@deploy1003> Finished scap sync-world: Backport for [[gerrit:1286484|Bump wikimedia/parsoid to 0.24.0-a3 (T409751 T420336 T425981)]], [[gerrit:1286485|Bump wikimedia/parsoid to 0.24.0-a3 (T425981)]], [[gerrit:1286488|Disable unit tests that fail with new vendor release]], [[gerrit:1286489|Skip ContentHolderTest that fails with new vendor release]] (duration: 14m 51s)