- From: Rhys Evans <notifications@github.com>
- Date: Sat, 06 Aug 2016 08:13:50 -0700
- To: slightlyoff/ServiceWorker <ServiceWorker@noreply.github.com>
- Message-ID: <slightlyoff/ServiceWorker/issues/756/238028067@github.com>
It's slow polling, every 5 minutes, so shouldn't be a performance worry > don't assume it'll be slow until you see it for yourself It's not just slowness I worry about, it's the amount of processing needed. Trying to be kind to the device's CPU by holding a fairly small object in memory and reading from the DB every 5 minutes. The downside - that the flags may be up to 5 minutes out of date - is something I can live with. I may do some experiments to test out the perf of reading from IDB each time though. So far it's just a quick fix to deal with the fact that multiple SW threads can exist in firefox, which was news to me. > do your flags often change during the life of a service worker Typically they'll change very infrequently, but if e.g. a page that's been open in a tab for ages is controlled by one SW instance, and another page is opened in another tab which spins up a new instance of the SW, and this page load comes with an update to the flags, then I'd want the update to propagate to the first SW instance. --- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/slightlyoff/ServiceWorker/issues/756#issuecomment-238028067
Received on Saturday, 6 August 2016 15:14:19 UTC