Robert Jones wrote:
Are there any tricks to speeding up Mediawiki? I have
many other pages on my
site that talk to the MySQL database that open in <1s but the Mediawiki ones
tend to take longer c.2-5s, and I don't have an enormous amount of load on
the server.
If you're not already using one, install a PHP opcode cache. Without
one, your server wastes a lot of time recompiling MediaWiki's source
code every time you hit a page.
Free/Open Source:
APC:
http://pecl.php.net/package/APC
eAccelerator:
http://eaccelerator.net/
Turck MMCache:
http://turck-mmcache.sourceforge.net/index_old.html
(older version)
Proprietary non-commercial:
PHP Accelerator:
http://www.php-accelerator.co.uk/
Proprietary commercial:
Zend Accelerator:
http://www.zend.com/
(Note that 'Zend Optimizer' is a different product, and less likely to
improve performance significantly.)
You may also get a slight improvement from using memcached instead of
the in-database cache for messages and rendered pages.
http://www.danga.com/memcached/
It is a wiki installation that isn't editable by
the public and doesn't use
a skin as such (I just allow all the HTML I want to allow by editing the
parser and another file), so I was wondering if there were any tricks to
bypass things and make the pages load quicker. It's probably worth noting
that I don't use the cache facility and that I have an extension that
displays only if someone is logged in (this is the reason for chche not
being used).
Enabling the parser cache can make a difference with longer pages as
well. If your extension just shows, and isn't particularly
time-dependent, you might hack User::getPageRenderingHash() to include
the logged-in state. This would cause the parser cache to store separate
entries for renderings for logged-in and non-logged-in users.
If you get a lot of reads by external viewers, you might also try
enabling the file cache, which can shave off a little more time for
anonymous viewer cache hits by reading complete page HTML from disk.
(See DefaultSettings.php; note you may have to tweak a couple of setting
for it to work.)
-- brion vibber (brion @
pobox.com)