PHP Markdown, speed, MovableType (was "Michel Fortin")

Michel Fortin michel.fortin at michelf.com
Thu Dec 2 17:52:01 EST 2004


John Gruber wrote:

> Yeah, my gut feeling is that PHP-Markdown is in use by more people
> than Markdown.pl. Michel's efforts are much appreciated, and I think
> have a lot to do with Markdown's (the syntax) growing popularity.

What I find somewhat comic in PHP Markdown popularity is that it is now 
taking ground in Markdown's "stronghold": MovableType. The new feature 
of version 3.1 -- dynamic pages -- use the PHP template engine Smarty 
to generate the pages, which is supported by PHP Markdown. :-)


Julian 'Julik' Tarkhanov wrote:

> It is used, simply because PHP is now much more widespread.
> But when I tried to integrate it into my personal project I found that 
> processing through the shell call to Markdown.pl is simply faster 
> (feels like it is by orders of magnitude faster).

You are right about this. Perl is a lot faster, at least when dealing 
with regular expressions, and it shows when using Markdown vs. PHP 
Markdown. It would be interesting to see a benchmarking tool included 
with the testing suite John is working on so we can get a better 
picture.

I still hope the optimization included in 1.0.1b2 will improve things 
for many people. I think people who write many long paragraphs without 
manual line breaks will see the difference. But it's still way slower 
than Perl.

**Idea:** Maybe someone could make a Markdown.pl wrapper for PHP that 
includes plugins interfaces present in PHP Markdown. This way, 
Markdown.pl could be used anywhere PHP Markdown can just by replacing 
the markdown.php file by the wrapper. This could improve performance 
for those who have access to Perl on their server.

The wrapper may also be a good solution for MovableType users in need 
of Markdown filtering in their dynamic pages, since MovableType already 
requires Perl.


Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/



More information about the Markdown-discuss mailing list