On Tue, Apr 5, 2011 at 7:45 AM, Ashar Voultoiz hashar+wmf@free.fr wrote:
On 05/04/11 04:47, Tim Starling wrote: > Speaking of "fast", I did a quick benchmark of the [[Barack Obama]] > article with templates pre-expanded. It took 22 seconds in HipHop and > 112 seconds in Zend, which is not bad, for a first attempt. I reckon > it would do better if a few of the regular expressions were replaced > with tight loops.
<snip> I have imported in my local wiki the english [[Barack Obama]] article with all its dependencies. I can not have it parsed under either 256MB max memory or 1 minute max execution time limits. Hiphop helps, but there is still a highly broken code somewhere in our PHP source code. No matter how much hacks we throw at bad code, the algorithm still need to get fixed.
For comparison: WYSIFTW parses [[Barak Obama]] in 3.5 sec on my iMac, and in 4.4 sec on my MacBook (both Chrome 12).
Yes, it doesn't do template/variable replacing, and it's probably full of corner cases that break; OTOH, it's JavaScript running in a browser, which should make it much slower than a dedicated server setup running precompiled PHP.
So, maybe another hard look at the MediaWiki parser is in order?
Cheers, Magnus