Foldexpr_markdown very slow for some documents #162
When working on a mixed Markdown/LaTeX document, I noticed after a while the performance of very basic actions like deleting a word or pasting text was becoming very slow.
I profiled vim to see what the culprit was, and it turned out the be the vim-markdown (commit 091091f from 2015/01/02)
To be sure that this was indeed the issue, I disabled vim-markdown folding using
Unfortunately I am not sure how to reproduce the issue outside of the larger document I am working on, so I cannot pinpoint the cause of the problem.
The document is not all that special, except that is contains a couple simple LaTeX equations and images. The image blocks are the most complex bit of LaTeX, and they look something like:
I'm sorry I can't provide a more reproducible example. Hopefully this might give you some ideas about the underlying issue, or perhaps someone else with the same problem can help to clarify.
Let me know if there is anything else I can do to help track down the issue.
The text was updated successfully, but these errors were encountered:
@khughitt Are you working on a Pandoc document or similar with a front matter? Is it possible that you have an unclosed YAML front matter in your document. Pandoc, for instance, has a weird front matter that opens with --- and closes with ..., and this plugin won't recognize that. At least for me this was the issue. Even if this is not the case for you, you may want to check to see if there is something in your text that this plugin considers as opening a block, and that is not followed by a bock-closing sign.
@retrography I am indeed using Pandoc to convert the Markdown to PDF, and am including a YAML header. As far as I can tell though, it should be properly closed.
The YAML block for the document is:
There is one other instance in the document of a long string of dashes used to create a header item (-----------), and I found one instance of '...' in a comment in the document.
It's been a while since I worked on that document, however, and when I tried to reproduce the issue just now I was unable to.
I'll re-enable folding though and let you know if I run into the problem again.
Feel free to close this issue in the meantime if you would prefer.
Is there any workaround for this?
I'm writing a small script to help me with pandoc-markdown-jekyll (it parses the whole file while making changes along the way with
The only workaround I found so far was using
BTW, Pandoc's YAML closure is valid. More info on this at jgm/pandoc#2668
Can this issue be reopened? Disabling folding seems to be a work-around, not a solution…
I am observing sluggish typing in this file: