Current configuration on the wiki
Find a file
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
.phan structure tests: allow PHP 8.1 syntax and autoload enums 2025-06-18 10:55:15 +01:00
cache In .htaccess deny files, use "Satisfy All" 2025-04-04 13:17:15 +00:00
docs config: Change Reauthenticate Time Default 2025-08-20 21:56:57 +00:00
extensions Update git submodules 2025-10-03 15:45:41 +00:00
images
includes DeduplicateStyles: Only transform possible style nodes 2025-10-03 23:19:17 +00:00
languages COPYING: Do not reference old FSF postal address 2025-10-02 09:32:10 +00:00
maintenance Regenerate patch-drop-page_restrictions-pr_user.sql for SQLite 2025-09-29 22:19:19 +00:00
mw-config installer: Fix class name in example override 2025-01-25 15:07:10 +00:00
resources SECURITY: Escape system messages in mw.language.listToText 2025-10-03 14:33:06 +00:00
skins Update git submodules 2025-10-02 20:25:49 +00:00
tests DeduplicateStyles: Only transform possible style nodes 2025-10-03 23:19:17 +00:00
vendor@d9b7761127 Update git submodules 2025-09-29 16:26:13 +00:00
.dockerignore
.editorconfig
.eslintignore SimpleParsoidOutputStash: add serialization test cases 2025-09-09 14:26:59 +00:00
.eslintrc.json
.fresnel.yml
.git-blame-ignore-revs
.gitattributes
.gitignore Branch commit for REL1_43 2024-10-22 12:47:33 -04:00
.gitmessage
.gitmodules Branch commit for REL1_43 2024-10-22 12:47:33 -04:00
.gitreview
.mailmap build: De-duplicate two recent CREDITS additions via mailmap 2024-09-11 10:02:02 -07:00
.phpcs.xml build: Use inline ignore for MediaWiki.Usage.DeprecatedGlobalVariables 2024-09-26 18:15:32 +00:00
.stylelintrc.json
.svgo.config.js
.vsls.json
api.php
autoload.php Make Content JsonCodecable 2025-09-05 16:12:09 -04:00
CODE_OF_CONDUCT.md
composer.json Upgrading wikimedia/parsoid (v0.20.3 => v0.20.4) 2025-09-29 16:47:11 +00:00
composer.local.json-sample
COPYING COPYING: Do not reference old FSF postal address 2025-10-02 09:32:10 +00:00
CREDITS build: De-duplicate two recent CREDITS additions via mailmap 2024-09-11 10:02:02 -07:00
DEVELOPERS.md
docker-compose.yml dev(docker): Bump mediawiki-web container to dev/bookworm-apache2:1.0.1 2025-01-07 17:02:36 +00:00
FAQ
Gruntfile.js
HISTORY HISTORY: Add point releases 2024-10-01 02:21:50 +01:00
img_auth.php
index.php
INSTALL INSTALL: Document requirement for bcmath/gmp on 32-bit systems 2025-04-18 15:57:48 +00:00
jsdoc.json
load.php
opensearch_desc.php
package-lock.json build: Updating npm dependencies 2025-01-06 08:38:45 -05:00
package.json Merge "Update Codex from v1.13.1 to v1.14.0" 2024-10-16 17:26:41 +00:00
phpunit.xml.dist
README.md
RELEASE-NOTES-1.43 Start 1.43.6 2025-10-03 17:54:59 +01:00
rest.php
SECURITY
thumb.php
thumb_handler.php
UPGRADE

MediaWiki

MediaWiki is a free and open-source wiki software package written in PHP. It serves as the platform for Wikipedia and the other Wikimedia projects, used by hundreds of millions of people each month. MediaWiki is localised in over 350 languages and its reliability and robust feature set have earned it a large and vibrant community of third-party users and developers.

MediaWiki is:

  • feature-rich and extensible, both on-wiki and with hundreds of extensions;
  • scalable and suitable for both small and large sites;
  • simple to install, working on most hardware/software combinations; and
  • available in your language.

For system requirements, installation, and upgrade details, see the files RELEASE-NOTES, INSTALL, and UPGRADE.

MediaWiki is the result of global collaboration and cooperation. The CREDITS file lists technical contributors to the project. The COPYING file explains MediaWiki's copyright and license (GNU General Public License, version 2 or later). Many thanks to the Wikimedia community for testing and suggestions.