There is currently notable overhead from having to call
Title::getPrefixedText/TitleFormatter upon serialisation,
and Title::newFromText/TitleParser upon unserialisation.
An unscientific benchmark:
> $start = microtime(true); $a = new RawMessage('some content');
> $a->title( Title::makeTitle( NS_SPECIAL, 'Badtitle/MessageCache' ) );
> $s = serialize($a); $b = unserialize($s);
> $duration = microtime(true) - $start;
> echo 'time: ' . round($duration * 1000, 1) . ' ms';
Run on mediawiki-docker-dev on PHP 7.2.28, via eval.php:
* Before: 129.7 ms, 118.6 ms
* After: 6.6 ms, 4.7 ms
Bug: T247035
Change-Id: I999db53e2f6189fb4319fefc2fbd8e5e5a228df0
This follows-up d83fcce5cb, which did something similar for
includes/profiler/.
* Ensure presence of license header.
* Merge any file-level descriptions with the class block,
where it gets seen in generated docs about that class.
* Add any missing `@ingroup` tags to class blocks.
* Remove remaining `@ingroup` from file blocks.
These clutter the Doxygen pages with duplicate entries.
* Fix some misspelled words from 61e0908fa2 and f136c2953c.
Change-Id: I5d21ec159766b799ba519da951d4f0716bae5f9f
The coupling of Status with the global request context for
Message object creation is a common pain point in unit tests and
in no-session code. As a short term solution (until Status is
properly deprecated) allow injecting a different localizer.
Also refactor the code a bit to get rid if the explicit need for
the context language (which is already implicit in the localizer).
Change-Id: I82a2e4a83743546a934fb938b94e877a2471a3d2
And also update approximated counts, which for the most part are lower
than reported (hooray!)
Bug: T231636
Depends-On: Ica50297ec7c71a81ba2204f9763499da925067bd
Change-Id: I78354bf5f0c831108c8f606e50c87cf6bc00d8bd