Le 16 août 2006 à 9:39, Paul M Jones a écrit :

So the functional/procedural PHP-Markdown is a little more than twice as fast as plugin-capable Solar_Markdown. If you transform the source text anew on every page load, this might be an issue; if you cache the transformed text for subsequent page loads, it's probably not.

Interesting numbers. PHP Markdown has been optimized quite much, it'd probably be hard to beat, speed-wise, for another PHP implementation.

I'm preparing a version of PHP Markdown which is more extendable too, and it'll probably be as fast as the current version. The idea is very simple: change `runSpanGamut` and `runBlockGamut` so that they execute a configurable list of functions instead of the hard-coded process we have today. This way, a subclass of Markdown_Parser will be able to add its own functions wherever it wants without having to redefine the gamut function entirely.

I'm also changing the way span elements are parsed to prevent **things *like** this* from generating invalid markup. It may or may not be slower once ready since I'm also removing other code obsoleted by the process.

 - - -

Interesting: I just found out that Solar Markdown is using the HTML Tidy library (built into PHP 5) to fix bad XHTML at the end of the process. That's clever. How come you've not mentioned it before? :-)


Michel Fortin
[EMAIL PROTECTED]
http://www.michelf.com/


_______________________________________________
Markdown-Discuss mailing list
[email protected]
http://six.pairlist.net/mailman/listinfo/markdown-discuss

Reply via email to