Current configuration on the wiki
The runtime numbers in each bullet point are based on a local benchmark that use a copy of WMF's InitialiseSettings.php file to compute enwiki's $globals via SiteConfiguration::getAll(). Source code and results can be found at <https://gist.github.com/Krinkle/2ef2fe72218b5f5cea91679df56a0b18>. * The getSetting() method (called by getAll) was iterating over each find/replace pair and performing a separate call to str_replace() via doReplace(). Instead, iterate the pairs only to create a replacements array (this array differs from the pairs in that it has a leading "$" in the search keys), and then call doReplace() once for each setting value, instead of multiple times. Also, switch from str_replace() to strtr() while at it (which promises to only search the string once, instead of repeatedly until it no longer finds any of the search patterns). Also also, generate the replacements array outside the getSetting() method and do this in the mergeParams() method instead, which is called before the getSetting-loop in getArray begins, thus further reducing identically repeated work. In my local benchmark for WMF/enwiki this reduced runtime from ~7.5-8.1ms to ~6.9-7.3ms. * The getSetting() method was using a by-reference assignment for a local variable that would hold a read-only copy a class member `$thisSetting =& $this->settings[$settingName];`. This was presumably a PHP4 or PHP5 era optimisation to avoid an eager memory copy given the promise to only read the data. However, in PHP5/PHP7 this is redundant given that PHP does copy-on-write. Removing the "&" symbol here made a drastic perf improvement, reducing my WMF/enwiki benchmark runtime from ~6ms to ~1ms. Bug: T169821 Change-Id: I0e8b395920c143f2b42f9d87c1afaffa2bfdaf2e |
||
|---|---|---|
| .phan | ||
| .pipeline | ||
| cache | ||
| docs | ||
| extensions | ||
| images | ||
| includes | ||
| languages | ||
| maintenance | ||
| mw-config | ||
| resources | ||
| skins | ||
| tests | ||
| .editorconfig | ||
| .eslintrc.json | ||
| .fresnel.yml | ||
| .gitattributes | ||
| .gitignore | ||
| .gitreview | ||
| .mailmap | ||
| .phpcs.xml | ||
| .stylelintrc.json | ||
| .travis.yml | ||
| api.php | ||
| autoload.php | ||
| CODE_OF_CONDUCT.md | ||
| composer.json | ||
| composer.local.json-sample | ||
| COPYING | ||
| CREDITS | ||
| DEVELOPERS.md | ||
| docker-compose.yml | ||
| FAQ | ||
| Gruntfile.js | ||
| HISTORY | ||
| img_auth.php | ||
| index.php | ||
| INSTALL | ||
| jsduck.json | ||
| load.php | ||
| opensearch_desc.php | ||
| package-lock.json | ||
| package.json | ||
| phpunit.xml.dist | ||
| README | ||
| README.mediawiki | ||
| RELEASE-NOTES-1.35 | ||
| 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. * Ready to get started? ** https://www.mediawiki.org/wiki/Special:MyLanguage/Download * Looking for the technical manual? ** https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Contents * Seeking help from a person? ** https://www.mediawiki.org/wiki/Special:MyLanguage/Communication * Looking to file a bug report or a feature request? ** https://bugs.mediawiki.org/ * Interested in helping out? ** https://www.mediawiki.org/wiki/Special:MyLanguage/How_to_contribute 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.