PHP Markdown, speed, MovableType
Julian 'Julik' Tarkhanov
listbox at julik.nl
Thu Dec 2 18:23:48 EST 2004
Personally when I was still busy with PHP (now my focus of attention is
in different, primarily study-related areas) I was setting a global
constant and depending on it, either a PerlMarkdown or a PHPMarkdown
formatter was instantiated. Obviously I finally setteld with Perl
version for speed :-) however, this is all completely simple (just a
bit of OO crud around two function calls) and I am not sure it can be
useable in plugin context.
I wouldn't mind to try to develop something like this, but I just don't
have the time to do it. Maybe this can be actually incorporated into
PHP Markdown itself? (I mean, this sounds a bit absurd, but not less
absurd and effective than a program like SketchUp using it's own C++
logic instead of Cocoa on OS X because it is faster).
I mean, I love Markdown, and I love it being available on my scripting
platform of choice, but in many web environments the speed hit is
immense.
So why not try to implement a Perl hook in your own package? Figuring
out paths can be quite a bit of pain but still...
P.S. It might be indeed interesting to see how Markdown performs in
different systems (assuming that the implementations are almost
identical).
On 2-dec-04, at 23:52, Michel Fortin wrote:
>
> 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.
>
>
--
Julian "Julik" Tarkhanov
More information about the Markdown-discuss
mailing list