Context: T231198, T231200, https://gerrit.wikimedia.org/r/c/mediawiki/core/+/532399. LocalisationCache was made a service in e4468a1d6b6b9fdc5b64800febdc8748d21f213d, but this apparently caused severe performance problems. Presumably this is because suddenly we were re-fetching all the messages on every request. The question is how to solve the test performance problem while still keeping LocalisationCache a service.
I don't know how to answer this question because I don't understand well enough what the code here is doing. I think the solution should boil down to a per-process cache of the parsed data that survives a service reset, assuming tests don't do anything that can affect the data's parsing. But I don't know the best way to do that. Perhaps tests should configure LocalisationCache to use an LCStoreStaticArray that's persisted between tests, and tests that want to not use it can opt out somehow?
This blocks all my Language work (which is five outstanding patches, not counting LocalisationCache and LanguageNameUtils which are in the process of being reverted).