Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow parsing with inline HTML on 0.4.14 #30

Open
youngbrioche opened this issue Nov 5, 2013 · 1 comment
Open

Slow parsing with inline HTML on 0.4.14 #30

youngbrioche opened this issue Nov 5, 2013 · 1 comment

Comments

@youngbrioche
Copy link

Converting a document with a certain amount of inline HTML is very slow. The original document contained way more content than just the <pre> tags, thus resulting in even higher conversion time. I stripped it down to just the inline HTML in order to ease reproduction.

I created a gist for the mentioned document.

$ peg-markdown -v
peg-markdown version 0.4.14
Copyright (c) 2008-2009 John MacFarlane.  License GPLv2+ or MIT.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

$ time peg-markdown document.md
[OUTPUT STRIPPED]
real    0m4.217s
user    0m4.202s
sys 0m0.009s

Suprisingly, plain old Markdown is pretty fast at converting the document:

$ time markdown document.md
[OUTPUT STRIPPED]
real    0m0.049s
user    0m0.042s
sys 0m0.006s
@jgm
Copy link
Owner

jgm commented Nov 5, 2013

Interesting. Oddly, I don't see the slowdown when I replace the pre
tags with div tags, but I can't see ANY reason for the difference, since
pre and div are handled in exactly the same way...

I'm not maintaining this project actively, but thanks for the bug
report. I'll take a further look if I have a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants