Open marnovo opened 7 years ago
I have a 70KB markdown file that around line 1700 (or 53KB of content) gets incredibly slow to edit
For now, I don't have a solution to improve the speed, unfortunately...
the MD preview pane stops to add any more lines after this, even tough it updates accordingly previous lines if I change them.
So, at the end of your file, if you add a line, nothing gets updated in the preview, BUT if you add somewhere else, it does?
For now, I don't have a solution to improve the speed, unfortunately...
Maybe add a config option to update rendering only every N ms?
So, at the end of your file, if you add a line, nothing gets updated in the preview, BUT if you add somewhere else, it does?
Yes and yes.
I tried this and it crashed sublime text.
For me in a markdown file with around 100 lines the key strokes are delayed to show in the original file and in the preview...
The plugin is very nice but with this lag it becomes a little uncomfortable to use :(
I hope you can find a solution for this lag :)
Is it possible for the plugin to simply use a debounce method? As long as there has been input in the last 300ms ( or whatever configured value the user sets ), don't update but as soon as that timer expires, update the preview.
Is it possible for the plugin to simply use a debounce method? As long as there has been input in the last 300ms ( or whatever configured value the user sets ), don't update but as soon as that timer expires, update the preview.
My thoughts as well. Might be a simple workaround, with little compromise.
More important than the debounce, would be making sure that the markdown converter only runs for the line you're editing.
@dessalines no because one line can affect other lines. Updating the preview each X s is a good idea, though. I just don't have time to work on it yet.
I think the only ones that are multi line are the code surrounders. It'd be easy to add a flag to always convert text in between those.
With a proper debounce, it shouldn't matter if you redraw the whole document. I suspect that people aren't typing markdown so quickly that they need the preview to update faster than the blink of an eye. For me, I'm typing a sentence or two and then want to look over and see what it looks like. Even at a 200-300ms debounce, it would prevent the dragging input and most people wouldn't notice the delayed re-draw.
I don't know a lick of python otherwise I would take a stab at it. Thanks though for all the great work. This is easily one of my favorite plugins.
This is easily one of my favorite plugins.
Wow... 😄
I've pushed a few commits that should help. Here are the changes:
on_modified
is now asynchronous. I tried this before, but the preview kept blinking. It doesn't anymore, so...x
s with a setting (ctrl+shift+p → Preferences: MarkdownLivePreview Settings
)I want to make sure i'm just lucky to get my both computers (tested on a pretty slow one, though) to not get this blink, so I haven't tagged anything yet → users won't get the update.
So could you try to explicitely update this package? → ctrl+shift+p → Package Control: Upgrade Package
, you might be able to find MarkdownLivePreview
, I'm not sure.
If you don't, could you remove this package (your setting won't be removed, don't worry), try to add it as a repository, I think Package Control doesn't need tags to update repo that the user has manually added:
Package Control: Add Repository
https://github.com/math2001/MarkdownLivePreview
Again: ctrl+shift+p → Package Control: Upgrade Package
If you still don't find it, install this package with git
.
Please let me know which solution worked for you (for updating).
This message is addressed to anyone who's willing to help me with this issue 🙂
I have a 70KB markdown file that around line 1700 (or 53KB of content) gets incredibly slow to edit and the MD preview pane stops to add any more lines after this, even tough it updates accordingly previous lines if I change them.