Page MenuHomePhabricator

Migrate Translate extension away from use of PHPDOM's getElementsByTagName
Closed, ResolvedPublic1 Estimated Story Points

Description

See parent task T317255: PHP's getElementsByTagName is slow prior to PHP 8.3 for justification and suggested replacements.

Event Timeline

Nikerabbit set the point value for this task to 1.Sep 13 2022, 8:08 AM

The only usage that I see of this is in XliffFFS::writeReal. This can be replace with \Wikimedia\Parsoid\Utils\DOMCompat::getElementsByTagName. Note that there are no tests for this class so we will have to be careful on how we test this.

Change 859051 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/extensions/Translate@master] Use Zest's getElementsByTagName()

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

Wangombe changed the task status from Open to In Progress.Nov 21 2022, 1:18 PM
Wangombe claimed this task.

Change 859051 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Use Zest's getElementsByTagName()

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

I've tested this locally. There is no easy way to test this on production hence marking this as done.