Hi,
after some browsing around in the code, I've found a major bottleneck:
the current internal link resolution system.
If you have a local Wikipedia install, try it for yourself: Visit a few
very link heavy pages, like [[List of reference tables]]. You will
notice that the rendering speed depends directly on the number of
internal links (not on the actual text size, or formatting tags). The
link cache seems to work as page rendering gets faster as you load a
page repeatedly, but it remains rather slow for link-heavy pages.
For further proof, edit OutputPage.php and in the function
replaceInternalLinks.php just add a return $s at the top. As a result,
internal links will no longer be resolved. Now browse a page (optimally
open Main Page before the change and follow links from there after it)
and notice that the rendering is lightning fast.
The internal link resolution process is quite complex. I notice that
lots of Title objects are created, and we have lots of ID lookups. I
won't speculate too much about the cause until I have had time to
examine them closer. But that this is a bottleneck is certain.
I believe we need to make use of the links and brokenlinks table for the
actual page rendering. Right now they seem to be used only for the
special pages.
Regards,
Erik
--
FOKUS - Fraunhofer Insitute for Open Communication Systems
Project BerliOS - http://www.berlios.de
after some browsing around in the code, I've found a major bottleneck:
the current internal link resolution system.
If you have a local Wikipedia install, try it for yourself: Visit a few
very link heavy pages, like [[List of reference tables]]. You will
notice that the rendering speed depends directly on the number of
internal links (not on the actual text size, or formatting tags). The
link cache seems to work as page rendering gets faster as you load a
page repeatedly, but it remains rather slow for link-heavy pages.
For further proof, edit OutputPage.php and in the function
replaceInternalLinks.php just add a return $s at the top. As a result,
internal links will no longer be resolved. Now browse a page (optimally
open Main Page before the change and follow links from there after it)
and notice that the rendering is lightning fast.
The internal link resolution process is quite complex. I notice that
lots of Title objects are created, and we have lots of ID lookups. I
won't speculate too much about the cause until I have had time to
examine them closer. But that this is a bottleneck is certain.
I believe we need to make use of the links and brokenlinks table for the
actual page rendering. Right now they seem to be used only for the
special pages.
Regards,
Erik
--
FOKUS - Fraunhofer Insitute for Open Communication Systems
Project BerliOS - http://www.berlios.de