On Wed, Feb 25, 2004 at 05:17:02PM +0000, Brion Vibber wrote:
Last time we did profiling, the Prime #1 Enemy was
OutputPage::replaceInternalLinks(). The rest of the page parsing was zippy
fast even with a hojillion passes.
This requires splitting up the page, identifying links, normalizing
titles, checking lookup tables for page existence, and generation of
output links. Make it fast and you win a prize!
Depending on how much time replaceInternalLinks spends doing regular
expression matching (as opposed to looking up page existence), you could
use the Flex code I have to nearly completely optimize away link
formatting. It would be very easy to update the code to convert the
link into a singular format - that way, there would be no need to do the
PHP regular expression matchings.
Kind of a pity that PHP doesn't let you compile regular expressions. :(
--
Nick Reinking -- eschewing obfuscation since 1981 -- Minneapolis, MN