Skip to content
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 issue related to Markdown previews #48

Closed
cfjedimaster opened this issue Aug 18, 2017 · 3 comments
Closed

Performance issue related to Markdown previews #48

cfjedimaster opened this issue Aug 18, 2017 · 3 comments

Comments

@cfjedimaster
Copy link

I filed a bug report (microsoft/vscode#32396) over on the main VSC repo due to an issue I was having with markdown previews. However, I think it is related to this extension. While testing the bug, I tried w/ all extensions disabled, and as I brought them back one by one, it was this extension that seemed to cause the issue.

Basically - markdown previews seem to be slowed down by something (maybe your extension? again - just seems like it, not 100% sure) and it gets worse when a document is opened after the preview.

You can see a video of it, and an extension host crash, here: https://www.screencast.com/t/cRMHoSlj94E

@tomocrafter
Copy link

Have you resolved this problem?
I still getting this issue and also launching is really slow

@cfjedimaster
Copy link
Author

Nope.

@swyphcosmo
Copy link
Owner

@cfjedimaster @tomocrafter Sorry that it took me so long to look into this.

I looked at the vscode error and tried the file you linked to (https://github.com/cfjedimaster/raymondcamdendotcom/blob/master/content/post/2017/08/09/career-advice-for-a-new-web-dev.md).

The screencast is no longer working so I'm unable to reproduce what you did.

I can provide some insight on what's happening with this extension. I use a pure Javascript implementation of hunspell in order to get around having to manage OS specific dependencies. The dictionary files are VERY large and must be loaded into RAM for spell checking operations. The English dictionary can take between 250 - 500 MB of RAM when loaded (See #34 for a lot more info).

When you open a new text file, the extension must check every word for spelling errors. With a large file and an older computer, this could take tens of seconds to complete. Once this first check is completed, all of the next checks only need to operate on the diff of the contents so it works much faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants