Currently reply links are added in the onOutputPageBeforeHTML hook, and therefore not cached for logged-in users. While the median time spend in this hook is <50ms, on longer pages this can take a few hundred ms[1].
(At https://www.mediawiki.org/wiki/Topic:Vwtdrzx2hszbdul1 someone reported a page where adding reply links takes about 1.5 s.)
We should be able to store the output in the parser cache, so that this method is called much less frequently.
We will need to split the cache on user language as the reply link itself uses the user language.
Done
Testing
Environment
- Beta cluster
Behaviors
- Check that the availability of the tool is unaffected by this patch, that it can be enabled/disabled via preferences or beta feature
- Check that the reply tool still loads correctly when enabled