wiki.techinc.nl/tests
Máté Szabó acb403ccfd DeduplicateStyles: Only transform possible style nodes
Why:

- DeduplicateStyles runs as a default post-cache output transformation
  for every backend pageview. It tokenizes the article HTML via Remex to
  deduplicate style nodes within.
- This is expensive for large pages. On the Barack Obama page, the
  transform takes 350+ ms on a parser cache hit.
- Some other transforms, like HandleSectionLinks, already use regexes to
  only run Remex-driven transforms on relevant elements to avoid a
  potentially expensive tokenization of the whole page.

What:

- Use a regular expression to limit this transform so that it only
  tokenizes potential <style> nodes. This takes ~2ms to execute on a
  large page[1], compared to ~166ms currently.
- Restrict this optimization to legacy parser output transformations,
  since the naïve regex used might otherwise match encoded style tags
  within data-parsoid attribute values, as described in
  I32d3d1772243c3819e1e1486351d16871b6e21c4.
  Add a test for this.

[1] https://en.m.wikipedia.org/wiki/Democratic_Party_(United_States)?action=render

Bug: T394059
Change-Id: I33ebcc2da7685b4b6dafdad3ed3ef2a9edea9a00
(cherry picked from commit 02f69d5dc99a964981c57b597eedffa1f253a14c)
2025-10-03 23:19:17 +00:00
..
api-testing block: Fix DBS::acquireTarget() race using GET_LOCK() 2025-04-07 11:43:34 +00:00
common SimpleParsoidOutputStash: add serialization test cases 2025-09-09 14:26:59 +00:00
jest mediawiki.special.block: "Editing their own talk page" is inverted 2024-10-21 09:42:47 -07:00
parser Use Remex/HtmlHelper to implement Parser::replaceTableOfContents 2025-09-29 22:01:08 +00:00
phan Add @phan-mandatory-param for function name arguments 2024-09-20 16:23:17 +00:00
phpunit DeduplicateStyles: Only transform possible style nodes 2025-10-03 23:19:17 +00:00
qunit mw.jqueryMsg: Allow complex expressions in parser functions' first param 2024-11-12 14:21:26 +00:00
selenium selenium: Fix 'Page should be editable' 2024-10-08 15:06:39 +00:00
uidesign
.htaccess In .htaccess deny files, use "Satisfy All" 2025-04-04 13:17:15 +00:00