mavo
mavo copied to clipboard
Expression evaluation does not happen when tab is inactive
We use requestAnimationFrame() for each computation cycle, which as it turns out is paused in inactive tabs. While in many cases this doesn't matter, @karger came across a case where it did (he was using expressions + custom JS to trigger notifications when data change). We should switch to using setTimeout() with an appropriate timeout. That will also be slowed to 1s in inactive tabs, but at least it won't be paused completely.
We should do a code review and replace any other critical rAFs as well.
hey @LeaVerou ! I would like to contribute however I have quite basic knowledge of Js
Hey @LeaVerou ! Is this issue still exists ? Would like to contribute on this
@DmitrySharabin Can we add something to CONTRIBUTING.md that says "Please don't ask if you can contribute, if it's a small issue just submit a PR, if it's a larger issue, and you have the experience to tackle it, just discuss your proposed design".
@DmitrySharabin Can we add something to CONTRIBUTING.md that says "Please don't ask if you can contribute, if it's a small issue just submit a PR, if it's a larger issue, and you have the experience to tackle it, just discuss your proposed design".
Sure, Lea. Will do it today.