How to automatically run a slow action like a compilation after every change in the Monaco editor without making the UI hang? #200
Labels
stack-exchange
Posts that were deleted by in that stupid website that allows post deletion.
I want to create a side-by-side live preview for a markup language with the Monaco editor, say something along https://markdown-it.github.io
I am able to automatically compile the HTML output whenever the content changes. But the problem is that if my markup compilation is slow (e.g. on a large document) that make the editor unresponsive.
Is there any Monaco-specific way to running the compilation on the background, while the editor remains responsive? I would then only start a compilation if one is not already ongoing.
Or do I just have to use Web Workers myself manually?
My problem can be reproduced with this dummy sample:
index.html
If I type several characters in editor in quick succession, it just takes a really long time to see those characters show up on the editor UK.
The text was updated successfully, but these errors were encountered: