-
Notifications
You must be signed in to change notification settings - Fork 160
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
High CPU Usage When Editing Files With Lots of Links #691
Comments
Either here! Markup. Seems the traditional fontification method is laggy, looking for treesit variant now. |
Hello, also experiencing extreme slow text edits in a markdown file with many links (file is just ~23K). Profiling Emacs (actually: Doom with Emacs 29.0.90) leads to the the same results as the issue reporter. I think I've enabled tree-sitter on the markdown-mode but I'm unsure on how to check if it's enabled and - if yes - how to check and compare the results. Should and additional package be installed to interface the markdown-mode to the tree-sitter? How does that actually look like? cc @c0001 for possibly some insights :) thanks! |
Uff... and now I also get bitten by this. This and the bug where markdown mode becomes slow in moderately large tables render it currently completely unusable for my projects. I am switching to |
Sorry for almost half a year lately to reply since I've not got any notification about this cc until I review my inbox. BTW, I've not found any markdown treesit relavance for emacs til now, so just a waiting again ... |
After a deep dive into this problem I came to the conclusion that the culprit is the underlying Happy to receive feedback though. I'd like to gain a better context about the issue to open an ticket/discussion on the emacs-devel mailing list. |
Why would it be font-lock's problem if the profiler says most of the time is spent inside
Same here, BTW, when editing a Markdown file with lots of links in one place (table of contents). |
I recently noticed that my emacs was lagging and having high CPU usage when editing markdown files with lots of links (Example file). I reloaded emacs with
emacs -Q --load <path to markdown-mode.el>
and I was able to isolate the problem to markdown-mode. I ran the profiler and I got the following trace:I'm not quite sure what's going on. It seems like it's spending an inordinate amount of time in
markdown-match-italic
, which would explain the high CPU usage, but it's not clear to me why it's spending so much time in that function. Initially, I thought it was because I was using*
to demarcate list items, which might have led to markdown-mode getting confused about unmatched italics markers, but shifting the list marker to-
did not solve the problem.I'm running emacs 27.1 on Ubuntu 21.10. I'm running
markdown-mode-20220212.728
, which is the latest that's on MELPA.If I can provide any additional information to help debug, please let me know and I'll be glad to try additional steps.
The text was updated successfully, but these errors were encountered: