I was recently made aware of the the Markdown 1.0.2 beta 4 and naturally downloaded it in great anticipation, as I am a big fan of Markdown :) Though I did notice a significant performance drop: The TextMate manual is 3,000 lines (173 KB) and previously took 4-5 seconds to convert to HTML (measuring only time spent by `Markdown.pl`.) With the new version this has increased to almost 30 seconds. Another problem is the new handling of embedded HTML (as block level tags.) Take this example: <div> <div id="foo"> </div> </div> The markup for that ends up as: <div> <div id="foo"> </div> <p></div></p>
Le 29 juil. 2006 ? 15:21, Allan Odgaard a ?crit :> I was recently made aware of the the Markdown 1.0.2 beta 4 and > naturally downloaded it in great anticipation, as I am a big fan of > Markdown :) > > Though I did notice a significant performance drop: The TextMate > manual is 3,000 lines (173 KB) and previously took 4-5 seconds to > convert to HTML (measuring only time spent by `Markdown.pl`.) With > the new version this has increased to almost 30 seconds.That's probably due to the new HTML block parser. It's clear that iterating through all tags to balance them properly takes more time than matching a regular expression based mostly on line indentation. Surely the fact that Markdown.pl continuously repass Markdown- generated markup through the HTML block parser does not help. I've stopped doing that with PHP Markdown Extra and it shows in term of performance. PHP Markdown Extra, with its own balancing HTML block parser, is also slower than plain PHP Markdown, but not by much. It shows the most with documents which have a lot of HTML; in fact I suspect it to be slower *only* when you have some HTML on the input, but I haven't made any benchmark to verify that.> Another problem is the new handling of embedded HTML (as block > level tags.) Take this example: > > <div> > <div id="foo"> > </div> > </div> > > The markup for that ends up as: > > <div> > <div id="foo"> > </div> > > <p></div></p>I'll leave that bug to John. Michel Fortin michel.fortin@michelf.com http://www.michelf.com/
Allan Odgaard <29mtuz102@sneakemail.com> wrote on 7/29/06 at 9:21 PM:> I was recently made aware of the the Markdown 1.0.2 beta 4 and > naturally downloaded it in great anticipation, as I am a big fan of > Markdown :)I haven't been very religious about posting my own development builds on a regular basis. I ran into that performance bug as well, and fixed it back in April. I'm pretty sure no one has that fix other than me. I'll do another beta release ASAP.> Though I did notice a significant performance drop: The TextMate > manual is 3,000 lines (173 KB) and previously took 4-5 seconds to > convert to HTML (measuring only time spent by `Markdown.pl`.) With > the new version this has increased to almost 30 seconds.Is that a single file, or a bunch of files? That'd be a great test case either way -- would you be willing to share the source input and your build script? (Or if you already have, remind where exactly I can find it -- I do recall your weblog post from a few months back explaining your Markdown-based documentation system.) I'm not entirely sure whether my current internal build performs as well as Markdown.pl 1.0.1, but I think it does.> Another problem is the new handling of embedded HTML (as block level > tags.) Take this example: > > <div> > <div id="foo"> > </div> > </div> > > The markup for that ends up as: > > <div> > <div id="foo"> > </div> > > <p></div></p>Interesting. I'm investigating now. -J.G.