Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use another namespace than MediaWiki: to avoid performance conflict with MessageCache #33

Open
Seb35 opened this issue Sep 22, 2022 · 0 comments

Comments

@Seb35
Copy link

Seb35 commented Sep 22, 2022

By default HeaderFooter uses pages like MediaWiki:Hf-header-page name. This is fine when there are only a few such pages, but when there is a great number of pages it adds a performance hit to the MessageCache mechanism of MediaWiki, which loads all pages in the MediaWiki: namespace (see method MessageCache::loadFromDB()).

To give figures, my company Wiki Valley hosts Everybodywiki, where HeaderFooter is used on almost every page (each with a dedicated HeaderFooter page): there are currently about 140,000 HeaderFooter pages, and MessageCache::loadFromDB() spend 44 seconds to be loaded instead of a few milliseconds for wikis without HeaderFooter.

So I propose to create a configuration parameter to define the namespace: $wgHeaderFooterNamespace = NS_MEDIAWIKI; by default but it could be set (e.g.) to $wgHeaderFooterNamespace = NS_PROJECT; to use pages like Project:Hf-header-page name. I developed such patch and it is currently deployed on Everybodywiki if you search the HeaderFooter pages there; I will submit this patch as a Pull Request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant