Comments (13)
Thanks for your report. I am aware that are some issues with lag and hanging, particularly with very large files, and I am actively looking into it. (See also #30 and #42.) This should be helpful in isolating at least one of the issues.
from markdown-mode.
I'm getting this also. My file is very small. Looking around briefly it appears this happens on all files. I just upgraded this morning. If I can be of more help, please let me know.
from markdown-mode.
Can you check to see whether the recent commits improved things?
from markdown-mode.
I have no quantitative data but I think it's better now. It doesn't hang anymore when using scroll-up-command
and scroll-down-command
or when folding and unfolding. However, the lag when typing fast is still here. When I type full speed, the displayed text doesn't update at all.
Edit: actually, the "typing fast" lag depends on where I am located in the file. Do you see any reason for this?
from markdown-mode.
Thanks for checking! I used the profiler to scroll through a large (> 5000 line) file and it is now much faster for me. I didn't check typing. Parsing Markdown accurately and in real time is difficult, but I will keep working to make it more efficient. I will try profiling when entering text into a large file as well to see where the bottlenecks are.
from markdown-mode.
Further profiling revealed that the insertion lag was mostly due to the after-change hook that performs wiki link fontification. I will have a patch ready soon that substantially speeds things up!
from markdown-mode.
Works great for me now. Thanks very much!
from markdown-mode.
@hut8 Great—I'm glad it's working better now.
@alecigne I just saw your edit. It does make sense that it could be better or worse depending on the surrounding context. Some regions may be more difficult to parse than others. When you insert characters, things have to be parsed again in case the syntax changed.
I just pushed commit acf7c5e which I think should essentially eliminate the lag when typing. Please let me know if not. For me, this makes any lag almost imperceptible in my 5000+ line file, but if it doesn't work for you then I may ask for a more specific test case.
Another thing you can do to increase performance is to set markdown-make-gfm-checkboxes-buttons
to nil
. When this is non-nil
, markdown-mode
must check all input for checkboxes.
from markdown-mode.
Hi,
Thank you for looking into this. Commit acf7c5e doesn't fix the lagging problem. My file is actually my PhD thesis and thus contains a LOT of references in the format:
[@chow2012]
or
[@goldberg2008; @pajerowski2007]
That may be the source of the problem. This is a format understood by pandoc-citeproc
. There are also quite a lot of sections. If you give me some time, I will try and build an example file in which the problem is present, since I don't want to send you my thesis (and you really don't want to receive it) ;)
As for now, I will continue to use markdown-mode under version 01dc652.
from markdown-mode.
One option is to obfuscate your thesis while preserving the syntax. Then I could see first hand what is happening. If you are on Linux or OS X, may I suggest using tr
to randomly scramble the letters while leaving the symbols, markup, and punctuation intact? Here's one suggestion:
cat thesis.md | tr '[a-zA-Z]' 'x' | tr '[0-9]' '1' > scramble.md
It translates all letters to 'x' and all numbers to '1'. If that's sufficiently obfuscated, then you could email the file to me at [email protected].
Edit: Of course, if your thesis is in French this won't handle some letters. You also could do it in Emacs:
M-x replace-regexp RET [[:alpha:]] RET x
M-x replace-regexp RET [[:digit:]] RET 1
Obviously, back up your thesis first :)
from markdown-mode.
I have also created a new branch to help us diagnose the problem without disturbing the main branch: https://github.com/jrblevin/markdown-mode/tree/diagnose-44
There are two commits of interest right now. Both are based on the current HEAD
.
- Commit c428fe9 reverts back to the old extend-region function from the "good" commit 01dc652.
- Commit a8af698 is (another) alternative extend-region function that I'd like to test.
Could you check number 2 first and if that doesn't work, also try number 1? Thanks for your patience while we narrow this down.
from markdown-mode.
Hi,
The new version of the function (commit a8af698) fix the lagging problem. For what it's worth, c428fe9 does as well.
My thesis is indeed in French, and is about biology – so in a way it is already pretty well obfuscated! But all jokes aside if you still need the file despite the new working function, let me know and I will send it to you.
Again, thank you for your quick response.
from markdown-mode.
Excellent! Likewise, thanks for testing out these changes so quickly and helping improve markdown-mode! Good luck with your thesis—it's an honor that you're writing it in markdown-mode. Let me know if you have any other issues.
from markdown-mode.
Related Issues (20)
- Add support for LaTeX enviroments HOT 1
- Markdown mode leads to heavy input lag HOT 11
- [filelink](does not support spaces in filename) HOT 3
- Caret signs inside math are fontified as Markdown markup
- register yank-media-handler so we can paste images HOT 7
- Should filename links be URI-decoded? HOT 1
- Update MacPorts links in README
- tab in lists items results in invalid list indent itemization
- [Feature Suggestion] markdown-beginning/end-of-line functions
- `move-beginning-of-line` move to wrong position on heading when markdown-hide-markup is enabled HOT 1
- preserve indent-tabs-mode in markdown-edit-code-block HOT 5
- Incorrect table alignment with code block HOT 1
- Markdown hiding for links broken when text surrounded by square brackets
- resurrect emacs-26 support? HOT 2
- Bug: Angle-bracketed URLs in inline code are fontified as links
- "_" character in a variable name turns on underline HOT 1
- Wrong gfm-view-mode syntax highlight if only using *-ts-mode (tree-sitter modes) HOT 1
- v2.6 ERT test failures on wiki-link-rules and wiki-link-search-under-project with Emacs 29.1 HOT 4
- R language isn't included in markdown-gfm-recognized-languages HOT 3
- Wrong table width calculation for Unicode Combining Diacritical Marks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from markdown-mode.