Hi, I usually create long markdown files to keep track of my work.
When I enter a key from the new beta version, the rendering stops for a long time, which is frustrating.
I would like to know if this is a problem or if it is affected by some debug mode.
So, it looks like the new Markdown parser (mdast-util-from-markdown takes a longer time to parse Markdown.
The performance vs extensibility is discussed here:
I think, is performance: micromark is currently slower than what used to be in remark-parse. About 50% slower. That is significant, but a) micromark is also better than what used to be in remark-parse, b) itās still fast to parse a big book, c)the problem with syntax trees is always the syntax trees, not the parsingāif remark is slow, thatās because a plugin is slow, not the parsing, and d) there is some low hanging fruit (see open issues).
Unfortunately, it is hard to solve this from the app side.
The problem here is that the rendering process locks the whole UI while parsing.
Iāll check out a solution using Web Worker.
But Iām worried that it will result in losing the extensibility of the Markdown parserā¦
BTW, you said you usually create long markdown files. What are the content of them? Log files?
In my note-taking workflow, I havenāt ever written thousands of lines, even with some server logs.
Do you edit the long notes in the side-by-side mode?
I guess the rendering process can be deferred more when in the edit mode so that it wonāt affect the editing experience as a workaround. Currently, itās 100ms but it could be 1,000ms when in the edit mode.
Thank you for the information
The way I use my notebook may be unique, but I keep a single file for each project I work on, whether work or personal, and I keep all the information I need to make decisions in the past. This is my favorite style because it makes searching and following the chronological order easier.
I donāt usually use side-by-side with my Apple M1 Pro 8core.
Thanks for letting me know your workflow. Yeah, that sounds unique!
Okay, so, extending the rendering delay would solve the issue. Iāll try it in the next version.
BTW, it made me think of trying the Rust Markdown parser by the same author of Micromark
Yes, it will lose the parser extensibility but it will greatly improve the performance.
It is still in alpha though, a very interesting project. Iāll keep my eye on it.