Page MenuHomePhabricator

Do not try to adapt the transclusion fragements
Closed, ResolvedPublic

Description

Suppose there is a transclusion element like <span about="5"data-mw={}... and next to that a <figure-inline about="5">..., right now cxserver tries to adapt the figure-inline using MWImage module. This is unnecessary and waste of time. Adapting the original transclusion is enough.

Checking for the existance of about attribute and missing data-mw attribute will be enough for skipping such a tag from adaptation process.

Also, if this figure-inline is inside the span tag, then also, we don't need to adapt. This will require correctly understanding the context of figure in the Doc.prototype.adapt method

Details

Related Gerrit Patches:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 13 2018, 12:13 PM
Pginer-WMF triaged this task as Medium priority.Jul 20 2018, 8:29 AM
Pginer-WMF moved this task from Backlog to Other on the CX-cxserver board.

Change 464796 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/services/cxserver@master] Do not adapt the translation units under a transclusion context

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

Timing analysis for translate api for infobox of en:Vantaa

Before the patchAfter the patch

33s to 3s!. No machine translation requests generated.

Change 464796 merged by jenkins-bot:
[mediawiki/services/cxserver@master] Do not adapt the translation units under a transclusion context

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

Mentioned in SAL (#wikimedia-operations) [2018-10-22T04:37:35Z] <kartik@deploy1001> Finished deploy [cxserver/deploy@904151f]: Update cxserver to eee8974 (T207070, T203077, T199529) (duration: 05m 42s)

It is even faster than @santhosh mentioned! Thanks!

Pginer-WMF closed this task as Resolved.Oct 30 2018, 8:21 AM