When PHP renders the Special:BlankPage (or any other page on any skin) the SkinTemplate::getPortletsTemplateData is called 4 times (after T351807 gets fixed it should be just two).
Let's rethink how can we optimize the execution flow within the SkinTemplate class as those methods access the Message class often, which makes it pretty slow.
Right now SkinTemplate::getPortletsTemplateData does three things:
- SkinTemplate::buildContentNavigationUrlsInternal -> which is cached
- Skin::buildSideBar -> which is cached
- Skin::getPortletData() which spends all the time in SkinComponentMenu::getTemplateData() -> this is not cached and is processed every time it is accessed.
SkinTemplate::getPortletsTemplateData is called from two places:
- SkinTemplate::getTemplateData()
- Skin::getCategories()
both are called from SkinMustache::GetTemplateData().
The possible improvement is ~2% of execution time - not much but it happens on every request to MediaWiki.