You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 regularGenericParser
andHTMLRenderer
, 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 bindingsDOMParser
/ Other Python libraries that do DOM parsing using C codeBut 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.
The text was updated successfully, but these errors were encountered: