| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Can be used for a variety of operations
including preservation of users privacy.
Bug: T290099
Change-Id: Iad75810310c95e96b5f8998b201ed04ace5af656
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Bug: T290021
Change-Id: Idaf25a209a65b9a36a0a24473c76523ee3a17e8d
|
|\| | |
| |/ /
|/| | |
|
| |/
| |
| |
| |
| |
| |
| |
| | |
This is just moving code verbatim, removing now-unneeded stuff, and
duplicating tests as well.
Bug: T290021
Change-Id: I540ddaaa11dfabcf0b87b608b151b5e34d199fd8
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Update the Chinese conversion table routinely to fix bugs reported at
https://zh.wikipedia.org/wiki/Wikipedia:字词转换/修复请求.
It is only data changes and only works for Chinese WikiProjects.
Change-Id: I14fc68ae8f6792e24127aaa93f6fe7aa1f786a26
|
| | |
| | |
| | |
| | | |
Change-Id: I6d0577124d852103f485ffdc819876a13f6641c3
|
| |/
|/|
| |
| | |
Change-Id: I8de1d70039390a3e204dddac9d445187b4bf554d
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
== Background
During a parse request [1] for a popular Wikipedia article, there
are 180,949 calls to MapCacheLRU::has and 188,542 calls to
::getCurrentTime via ::getAge. (Note, getCurrentTime has more calls
than ::has, as there are also calls via ::set and ::setField).
In a one-off XHGui profile, these calls had 246ms wall-time or 258ms
cpu-time attributed to them, which is 0.25s of a 12s parse or 2%.
In a day's worth of index.php samples [2] [3], there is 1.1% cpu-time
or 1.4% wall-time attributed to MapCacheLRU, of which ~0.3% in
getCurrentTime() alone.
== Change
Most uses of MapCacheLRU are without any in-process TTL, and thus have
$maxAge at its default of INF. Avoid calling getAge and getCurrentTime
in that case.
I think long-term it might make sense to deprecate the TTL feature
in MapCacheLRU, as it is very very rarely used, and still adds
significant overhead to all uses MapCacheLRU and its set() code path.
For cases where in-process TTLs are really needed, the HashBagOStuff
class could be used instead. I can't find any complex uses of
get/setFields, let alone with per-sub field TTL, but a theoretical
or third-party use case could potentially use HashBagOStuff with
sub-fields either as their own key, or refactor to put arrays under
a single key and TTL, or re-create it in their own code base if really
needed.
== Difference
I've added a benchmark since generating random values and populating
MapCacheLRU seems non-trivial enough to be worth a re-usable bench.
Using `benchmarkLruHash.php --method get --count 1000`, before:
> MapCacheLRU::get with 500 keys
> count: 100
> rate: 28.5/s
> mean: 35.06ms
... and after:
> count: 100
> rate: 35.6/s
> mean: 28.10ms
[1] POST en.wikipedia.org /w/api.php?action=parse&title=Barack_Obama&text={{:Barack_Obama}}
[2] https://performance.wikimedia.org/arclamp/svgs/daily/2021-09-06.excimer.index.reversed.svgz
[3] https://performance.wikimedia.org/arclamp/svgs/daily/2021-09-06.excimer-wall.index.reversed.svgz
Bug: T275673
Change-Id: Id8c747f0d0a9454274c296090a2ca80e440f97bb
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This patch injects services into WikiExporter. It also adds a
WikiExporterFactory service for creating WikiExporter instances.
Change-Id: Ib1547defea54c309865c116bc83d617c21568843
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
With this patch deprecation warnings will be emitted
if $wgUser is accessed or written into. The only pattern
of usage still allowed is
$oldUser = $wgUser;
$wgUser = $newUser;
// Do something
$wgUser = $oldUser;
Once there is no deprecation warnings, we know that nothing
legitimately depends on $wgUser being set, so we can safely
remove the code that's still allowed as well.
Bug: T267861
Change-Id: Ia1c42b3a32acd0e2bb9b0e93f1dc3c82640dcb22
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This helps phan to detect unreachable code and also impossible types
after the functions.
It helps phan to avoid false positives for array keys
when the keys are checked before
Bug: T240141
Change-Id: I895f70e82b3053a46cd44135b15437e6f82a07b2
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Addition and remove of suppression needs to be done with the version
update.
Change-Id: I3288b3cefa744b507eadebb67b8ab08c86517c1c
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: Ia81903fb2a8157625fbe63115097eccc1161b5db
|
|\ \ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Restriction names are used in two tables, we should update
both.
Bug: T290398
Change-Id: Ic5e77ee451f12acfd0c69afe9a5c498885ffeaa5
|
|\ \ \ \ \ \ |
|
| | |/ / / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The variable already has the value
Change-Id: I75f25cc944e30d91a65e1d2bb0abce7d671b19b8
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Use ObjectFactory specs for collation classes
Avoid the language construction in the factory class,
make it a detail of the implementation of each class
Follow-Up of Ifc96f851e6091ce834dbaf0e91695c648a42169c
Bug: T286079
Change-Id: Ib581f64aec8619986fb8dd49ceee0524d59a1b84
|
|/ / / / /
| | | | |
| | | | |
| | | | | |
Change-Id: I833052a656b1ce419c0929f6f0514f2a33c2c4cc
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Bug: T282894
Change-Id: I6d6361a0b84f7130a27df6a6c75a983c73e5dd95
|
|/ / / /
| | | |
| | | |
| | | | |
Change-Id: I5c90822f1da6af7354ee7e2d67d579bd72bce8c3
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: Ia0b4fc6cf4c0e5f481461c383a66e68fe111f653
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Hard-deprecating immediately as no known users in git outside of mainteance scripts.
Bug: T282894
Change-Id: I072f3d93a9598df719f76f635bfd477737097ad9
|
| |/ /
|/| |
| | |
| | |
| | | |
Bug: T282894
Change-Id: I0d80be56e683924254c4e38d05e1109ea74eeab5
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Use the replica DB for read queries.
Bug: T263340
Change-Id: I5ab5706390dfc012c86bc18094c5baf457b8cbe8
|
|\ \ \ \
| |/ / /
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
These not only make the code more robust, but also help a lot when
writing unit tests: if a method is return-typehinted and its class is
mocked, the mock method will automatically return a mock of its declared
return type. Otherwise it will return null, and developers are forced to
manually mock the method if the return value is used by the SUT in a way
that doesn't accept null.
Depends-On: I628fcb1807133390c7b9b47984f512f5b1ae58d0
Depends-On: I7080bc505f5838b2f51a368da562104e206063b0
Change-Id: I59068cfed10aabf6c6002f9e9312a6ef6e7e9441
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Returning void from execute() is success.
Returning true is success, false is failure with exit(1)
Using fatalError also using exit(1)
Change-Id: I1d40430ad6226e4aab8f0810b03ee1213282d123
|
|\ \ \ \
| |/ / /
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Bug: T287247
Change-Id: I40f560a2143a2c0fda8cb7233d9954dc645749a3
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Remove primary IIFE when setting mw.loader, which reduces
indentation by an extra level. Futher cleanup will be done
to the code for mw.loader.store in a follow-up.
The fnv132() function, which is only used in the loader, was
among the extra bits that were moved.
Should have no effect on the functionality.
Change-Id: Ie475879727e4170eb47f3fc78048379c7190844d
|
|\ \ \ \ |
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
FileBackend::doQuickOperations is documented to return StatusValue,
but syncFileBatch is documented to return Status.
Change-Id: I5e9dc48bf43e96a18619a2290dd7995d5fdc7f0a
|
|\ \ \ \ |
|
| |/ / /
| | | |
| | | |
| | | | |
Change-Id: Ie555efd6f70762f4e085957d59306623570459a5
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
fread cannot return null, it returns false instead
Avoid using null in a string concat
Change-Id: Iae0ac52040335b1b39af7cace82e76f6cfd89ef0
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
<https://gerrit.wikimedia.org/r/c/mediawiki/core/+/713031>
Change-Id: I60ec9a263a66747a1a5177584d3d04692f011e49
|
|\| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This makes it easier to run, but more importantly, makes it obvious
that the file in /data/jsmin is still conceptually in use.
Change-Id: Iaf10c9bd2f6643bcb0bae95eaf22ec92de15950d
|
|\| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* Move data files to /data
* Add benchmarkCommentFormatter, named for the new class hierarchy.
Bug: T285917
Change-Id: Idf2529894fe63d34087d6d5ce4dd1676c89b1373
|
|\ \ \ \ |
|