If file either requires autoloader or autoloader is already loaded from parent, it should not require the file(s) listed in autoloader again.
Spotted affected files listed in further comments.
If file either requires autoloader or autoloader is already loaded from parent, it should not require the file(s) listed in autoloader again.
Spotted affected files listed in further comments.
(In reply to comment #1)
config/Installer.php
This file is going away entirely, very soon. No need to bother.
(In reply to comment #2)
includes/Setup.php
Most of the requires in Setup.php need to be included in the global scope (global functions, defines, etc) and can't run through the autoloader. Less global-oriented code would help with that.
Any other suggestions?
tekmosis wrote:
I did a profile on my wiki to see why it's so slow and the AutoLoader.php is being hit 50+ times and that's excluding extensions, the AutoLoader.php script alone takes a total average of 530ms. Is that really necessary when viewing a page? that seems inefficient to me but again, I don't know if every one of those files are required to be loaded.
(In reply to comment #6)
I did a profile on my wiki to see why it's so slow and the AutoLoader.php is
being hit 50+ times and that's excluding extensions
Define 'being hit'? The number of require_once's for it should be very slim. But even then, a require_once will, as the name says, only "hit" it once.
Though 530ms is a lot, it most certainly helps to configure cache. Running any serious/production wiki without cache is irresponsible.
At the very least activate internal caches such as for i18n, expensive operations (dbcache or memcached). If you want to avoid hits to (most of) the backend entirely you could go for file cache or even go large-scale and set up squid/varnish in front of it. Read more at https://www.mediawiki.org/wiki/Manual:Cache.