markdown-to-jsx icon indicating copy to clipboard operation
markdown-to-jsx copied to clipboard

Exponential loading time

Open ETHAN-MENDEL opened this issue 11 months ago • 1 comments

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?

ETHAN-MENDEL avatar Dec 05 '24 14:12 ETHAN-MENDEL

Could you possibly provide some example content?

quantizor avatar Jan 05 '25 19:01 quantizor

This should be fixed in 8.0

quantizor avatar Oct 26 '25 12:10 quantizor