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

Exponential loading time #639

Open
ETHAN-MENDEL opened this issue Dec 5, 2024 · 1 comment
Open

Exponential loading time #639

ETHAN-MENDEL opened this issue Dec 5, 2024 · 1 comment

Comments

@ETHAN-MENDEL
Copy link

ETHAN-MENDEL commented Dec 5, 2024

I've been using this package to render some pretty large/complex markdown within a vscode webview pretty successfully for a while. All of a sudden I noticed from one case that the webview seemed to lag out and eventually vscode would stop responding and ask to force quit itself.

As I started debugging this issue, I noticed that the number of characters I was trying to render ended up increasing the render time astronomically. These are the outcomes of the experiments I conducted:

For each run, I formatted the same string as markdown using the same method which resulted in a string of length 3205, then sliced the string to the specified lengths to ensure as controlled environment for testing as possible

characters to render render time
2620 instant
2630 5 sec
2675 30 sec
2700 1 min
3205 causes vscode timeout

These character counts do include the markdown special characters like # / - / `

Does anyone else have this problem or see something similar?

@quantizor
Copy link
Owner

Could you possibly provide some example content?

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

2 participants