ASKBOT / askbot-devel

Askbot is a Django/Python Q&A forum. **Contributors README**: https://github.com/ASKBOT/askbot-devel#how-to-contribute. Commercial hosting of Askbot and support are available at https://askbot.com
Other
1.56k stars 627 forks source link

Update preview less often than at each keystroke #880

Open slel opened 3 years ago

slel commented 3 years ago

Currently, when typing a question or answer, Askbot updates the preview at each keystroke. When the question or answer is getting long and/or has a fair amount of inline code or code blocks and more importantly inline or displayed math which render using MathJax, this causes a major slowdown.

It might make more sense to update the preview only when the user stops typing for at least a second.

slel commented 3 years ago

When typing a comment containing math, we can see some preprocessing going on at each keystroke too, even though there is no preview!

Can you fix that or hint at the part of the code that needs fixing so someone can prepare a fix?