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

Do some benchmarking #23

Open
dominickpastore opened this issue May 17, 2021 · 0 comments
Open

Do some benchmarking #23

dominickpastore opened this issue May 17, 2021 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@dominickpastore
Copy link
Owner

The DOMParser (not in the repo at the time of this writing, but will be soon) provides an alternative interface for Markdown parsing and HTML generation. It's more flexible than the regular GenericParser and HTMLRenderer, but comes with extra overhead.

It would be helpful to do some benchmarking between them to be able to demonstrate how much performance a developer might be giving up by using DOMParser.

While we're at it, it could be useful to include some other Python Markdown libraries in the benchmark. My educated guess is that the performance for HTML generation would rank roughly as follows, from fastest to slowest:

  • HTMLRenderer / Other Python libraries that are implemented in C or C bindings
  • Pure Python HTML generators not based on DOM parsing
  • DOMParser / Other Python libraries that do DOM parsing using C code
  • Pure Python HTML generators based on DOM parsing

But this is really no more than a guess. I'd like to gather some actual numbers.

If the results are surprising (or even if they are not), it would be worth digging into whether there are any bottlenecks that could be improved.

@dominickpastore dominickpastore added documentation Improvements or additions to documentation enhancement New feature or request labels May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant