-
Notifications
You must be signed in to change notification settings - Fork 165
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
Performance issues in long lists when using italics. #391
Comments
Same problem. It would be nice to have a toggle for |
I'm getting the same problem as well, but strangely enough, it's manifesting in a file that has a lot of inline code snippets, whereas other files (which do have a lot of italics) don't display any perceptible input lag. Here's the profiler report when emacs is slow (i.e. when running on a file with lots of code snippets):
It seems like EDIT: I just took another look at the file, and I realized that it doesn't have any italics at all in the body text. It does, however, contain several dozen snippets of Python code, which have numerous underscores. Is there a way to exclude code blocks from |
Can confirm the issue occurs with deeply nested lists using the (defconst markdown-regex-italic "\\(?:^\\|[^\\]\\)\\(?1:\\(?2:[_]\\)\\(?3:[^ \n\t\\]\\|[^ \n\t]\\(?:.\\|\n[^\n]\\)[^\\ ]\\)\\(?4:\\2\\)\\)")
;; or
(defconst markdown-regex-gfm-italic
"\\(?:^\\|[^\\]\\)\\(?1:\\(?2:[_]\\)\\(?3:[^ \\]\\2\\|[^ ]\\(?:.\\|\n[^\n]\\)\\)\\(?4:\\2\\)\\)"
|
FYI still seeing this using latest Emacs Emacs is basically unusable for editing this file as long as |
Same here: the longer the list the slower it is. And if the list is too long, emacs becomes unusable. The only "solution" I found is to disable font-lock, which is not ideal... Does anyone have an idea? |
I see the slowdown in a gfm list of 224 items without any italics and using - as the list indicator (all the items have checkboxes). The only use of |
I found this workaround to be effective: #799 (comment) |
I also find it to be effective. It should make debugging the issue easier to get to the root cause of the problem. |
It seems like |
Linux, Emacs 26.2, current markdown-mode MELPA release.
When editing a list of 30+ items, each of them a few lines long with at least one word in italics, performance degrades spectacularly in linear proportion to the number of items in the list, eventually resulting in latencies approaching 0.5s between a keypress and it showing up on screen.
Let us have a file like that:
Repeat this line 30-50 times. The slowdown increases proportionally to the number of items in the list, and it persists with
emacs -Q
, though obviously, it takes a few more lines to achieve the same kind of slowdown. (76 is sufficient in my case.)profiler-report
reports something like this:The situation improves a lot if lines are hard-wrapped, but does not completely disappear, it just takes a longer file to bring emacs to a halt, and hard-wrapping is in itself a pain.
Could something be done about that?
The text was updated successfully, but these errors were encountered: