2

There are many instances where I leave a looped async function running on a chrome tab (for testing) but whenever I leave the lab, Chrome seems to significantly lessen the speed at which js runs on that tab. Is there any way to have full cpu power for running javascript on a different tab than that I am currently on?

For example, when I'm running a js test file on tab 1 with localhost:3000 but I go off another tab to do something else for a while. When I come back to tab 1, I see minimal progress.

1 Answer 1

2

https://developers.google.com/web/updates/2017/03/background_tabs

Background tabs can have a dramatic negative effect on browser performance, especially on battery life. To mitigate this, Chrome has been placing various restrictions on background tabs for the last several years.

...

Chrome provides the --disable-background-timer-throttling flag for use cases like running test suites and other user-sanctioned heavy computations.

So basically just launch chrome with the --disable-background-timer-throttling and you should be good to go

1
  • So there's no way of just setting 1 tab to be like this. Correct?
    – Eddie Kim
    Commented Aug 14, 2020 at 22:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.