turuslan / HackTimer

MIT License
491 stars 93 forks source link

Google Chrome #24

Closed barsteadr closed 7 years ago

barsteadr commented 7 years ago

Unfortunately, it looks like Google may have patched around this wonderful webworker hack. (This hack fails in Google Chrome 54.0.2840.71). Our team is investigating but we thought we'd submit an issue here too. If we discover the solution we'll be more than happy to contribute to this work.

turuslan commented 7 years ago

Thanks

JonMcPherson commented 7 years ago

I made an SO question on this same topic with a demo. http://stackoverflow.com/questions/40475238/web-workers-in-chrome-v54-run-twice-as-slow-when-running-in-an-inactive-tab

Stofkat commented 7 years ago

This hack looked like a lifesaver for me, but indeed doesn't work in the current version of Chrome. Is this issue likely to be fixed or has the patch made the workaround completely impossible? Would like to know if I'd have to rewrite my code to a worker. Thanks!

erichummel commented 7 years ago

yes, unfortunately this doesn't work anymore. it was a lifesaver when it did, bummer. I'm going to have to come up with some other solution for this problem, as we've got an SPA that very much relies on timers, and get's all screwy when the tab is backgrounded for a while.

jasongrishkoff commented 7 years ago

Any recommended solutions? Also working with an audio app.

dskvr commented 7 years ago

I'm using latest version of Chrome and it's working perfectly.

JonMcPherson commented 7 years ago

@dskvr Yes it seems the throttling for inactive tabs was removed!

CatsAreFluffy commented 7 years ago

Close?

jasongrishkoff commented 7 years ago

Yeah, hasn't been a problem for me in a while.