2011-05-03 13:25, Daniel Friesen skrev:
> On 11-05-03 03:40 AM, Andreas Jonsson wrote:
>> 2011-05-03 02:38, Chad skrev:
>> [...]
>>> I don't see any problem with keeping the parser in PHP, and as you point out
>>> with HipHop support on the not-too-distant horizon the complaints about
>>> performance with Zend will largely evaporate.
>> But most of the parser's work consists of running regexp pattern
>> matching over the article text, doesn't it?  Regexp pattern matching are
>> implemented by native functions.  Does the Zend engine have a slow
>> regexp implementation?  I would have guessed that the main reason that
>> the parser is slow is the algorithm, not its implementation.
>>
>> Best Regards,
>>
>> Andreas Jonsson
> regexps might be fast, but when you have to run hundreds of them all
> over the place and do stuff in-language then the language becomes the
> bottleneck.
> 

The time it takes to execute the code that glues together the regexps
will be insignificant compared to actually executing the regexps for any
article larger than a few hundred bytes.  This is at least the case for
the articles are the the easiest for the core parser, which are articles
that contains no markup.  The more markup the slower it will run.  It is
possible that this slowdown will be lessened if compiled with HipHop.
But the top speed of the parser (in bytes/seconds) will be largely
unaffected.

/Andreas

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to