Last modified: 2013-03-28 02:59:57 UTC
In https://gerrit.wikimedia.org/r/#/c/29879/ I was able to save tens of megabytes of memory by using Html::element( 'a' ) instead of Linker::link. Profiling also confirms my observations: over 20k per call and 0.5 ms per call. Not much per se, but it really adds up when making hundreds or even thousands of links like I do. Part of this might come from hooks: Translate and SemanticForms are using hooks in linker.
It looks like the hooks are not a major source of inefficiency: http://translatewiki.net/w/profileinfo.php?filter=SpecialMyLanguage%3A%3Alinkfix http://translatewiki.net/w/profileinfo.php?filter=SFFormLinker%3A%3AsetBrokenLink
We should probably put real profiling around those hook calls. Or do we do that implicitly?
All hook calls are profiled, you just need to know the name of the hooked-up functions to search for them.
Sounds unreliable. We should also profile whole combined calls for separation from the surrounding function. We've got another bit of profiling there for the known stuff that does db calls. How long does that take?