markdown-to-jsx
markdown-to-jsx copied to clipboard
Exponential loading time
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?
Could you possibly provide some example content?
This should be fixed in 8.0