cannot convert simple .md file to ePub (CPU leak) #2671
ousia
commented
ousia
changed the title from cannot convert simple .md file to ePub to cannot convert simple .md file to ePub (CPU leak)
This document has thousands of identically named headers.
I believe that is the problem. Translation slows down
as it goes, and it is almost certainly because
`registerHeader` uses a linked list of the previously
used header identifiers. Each time pandoc parses a
header, it needs to traverse this linked list. If the
list has thousands of elements, this can start to take
some time.
At least this hypothesis is consistent with the behavior
I'm seeing running a conversion to HTML.
There may also be a laziness-related space link. All this
can be solved by using better data structures, probably.
I didn't really think anyone would have more than a few
identically named headers -- and they won't appear in
real-world cases.
+++ Pablo Rodríguez [Jan 22 16 02:26 ]:
…
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I cannot convert http://ousia.tk/font-face.md into an ePub with version 1.16.0.2 (on Fedora 22).
pandoc -o font-face.epub font-face.md
seems to enter in a CPU leak.