Great, that makes total sense and seems to have worked well. I think it
looks like for article views, 1.12 is performing better than 1.9 now, thanks
for the help.
For opcode caching, we're using eaccelerator, should we be using something
else? What does WP use?
Also, I noticed that the PHP sapi name for WP is just apache, while ours is
apache2handler. Could there be a difference in terms of performance between
the 2? How do you go about creating just an apache module?
Thanks,
Travis
On Mon, Jun 9, 2008 at 11:52 AM, Brion Vibber <brion(a)wikimedia.org> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Travis (wikiHow) wrote:
It seems part of our problem in Setup.php is the
setting of function
hooks.
Just to clarify, this is the most efficient way
to set a function hook,
right?
$wgExtensionFunctions[] = 'wfWikiHowParserFunction_Setup';
function wfWikiHowParserFunction_Setup() {
global $wgParser;
$wgParser->setFunctionHook( 'ARTICLESSTARTED',
'articlesstarted');
$wgParser->setFunctionHook( 'PATROLCOUNT', 'patrolcount');
}
This will force $wgParser to be unstubbed at setup time. This isn't the
end of the world, but it will have a couple of effects:
* If you don't have a working PHP opcode cache, this means that the big
Parser class gets loaded whether you need it or not
* Actual parser object initialization happens whether you need it or not
* Parser initialization will be accounted in the extension setup phase
in your profiling, which may skew the visible results.
In practice, this probably won't cause too much trouble. The parser is
going to get unstubbed on just about any request that outputs HTML;
it'll get used for UI message transformations even if you're outputting
a page from the parser cache.
But for 304 "not changed" results, and potentially for some API hits and
stuff, it might shave off a few milliseconds to be able to skip it.
To do that, you want to call setFunctionHook() from a parser first call
init hook, as currently done by a lot of our extensions, as mentioned in
my last post in this thread.
- -- brion
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iEYEARECAAYFAkhNUa4ACgkQwRnhpk1wk45pugCgs6ESM+jWNVsJFRQUxlK4og0B
GZgAn3bIJwUZbjnHaZCwekCuvNMoDXr0
=Vnq+
-----END PGP SIGNATURE-----
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l