Issue metadata
Sign in to add a comment
|
consider throttling infinite repeating tasks in background tabs, e.g. for tab title/favicon changes |
||||||||||||||||||||
Issue descriptionA number of sites infinitely toggle the tab title in background tabs (e.g. to notify of a chat). This is a nice feature, but doing it infinitely means burning a lot of the user's battery. We should look into throttling or curbing this in some way.
,
Jun 21 2017
Hmmm...there's something more going on here in Safari. Google Hangouts is able to dynamically change the tab title.
,
Jun 21 2017
I can't tell what Safari is doing. Sometimes my plexode link works and sometimes it doesn't. Sometimes Hangouts works and sometimes it doesn't. I made a modified version so I could background the tab first before tab title changed and it seems to also sometimes work. http://plexode.com/eval3/#s=aekVQXANLVQMbA2FKAR4BERw9T2ABVVBISE1GNUpVpAkKAVycAQFwD3aXAUoMDAEGExYBEwEgAT0DUE9GwgEbwQNVWFDCm09enJxURlWmTkZQVlUJqpcfrK4B1VUqT1VGU1dCTQmgoqSmqEYNARIR+QqcXvYWfIRBQcAYNYZLJaSAYRAZeAA=
,
Jun 21 2017
This test case shows kind of what they're doing. When a tab is background they have some sort of super-linear backoff on setting tab title. I think that's actually just them increasingly throttling the background tab. We should probably figure out what they're doing. http://plexode.com/eval3/#s=aekVQXANLVQMbA2FKAR4BERw9T2ABVVBISE1GNUpVpAkKAVycAQFwD3aXAUoMDJtPXpycVEZVpk5GUFZVCaqXH6yuAb5VKk9VRlNXQk0JoKKkpqhGDQESEeIKnF7fFuIRChwDDQNQS0uSAxEDXgA=
,
Jun 21 2017
Can't say I understand what the logic is, but it looks like they grow up until a max clamp of 1 minute in background tabs. I'm looking at the code as best I can tell and I'm not seeing this logic: https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/page/DOMTimer.cpp. Interestingly it looks like the clamp setInterval on a per-timer basis and they clamp setTimeout completely differently based off nesting level. http://plexode.com/eval3/#s=aekVQXANJVQMbAx1RU0YBSkUePQNNUEhIRlOdHx0QlkYfAw0DS5GTYUoBHgERHD1PYU1CVFU1Sk6YtSVCVUYPT1BYCQq4T2ABVaBITUbAVdbNAVy5AQFwD3a0mQwMz99hT0ZYwMLkxcfJy83o4A9uCQifoaMIBQPNABBi1To9XKdgaZhSdDYBhIMAIJdbtYKYBwBXi+dxGZzejK9X8WckUjjPL0IJ5UI0iYRQKxVBLbDwfbkflZVFRPY5TK5CJoJaahazYawNAISCNKBS5L1HpNLDisAZQJZLSQDCIDLwAA== That page had this output: 1: 2004 2: 1405 3: 2000 4: 2511 5: 4481 6: 12601 7: 8366 8: 21469 9: 1909 10: 46944 11: 54846 12: 59998 13: 60604 14: 59391
,
Jun 21 2017
Yeah, I give up finding the code for this.
,
Jun 21 2017
Today we have time-based background throttling. I wonder if we should also have count-based throttling, e.g. 10 tasks per 10 minutes or something like that? Thoughts/ideas welcome.
,
Jun 23 2017
,
Jun 23 2017
,
Jun 26 2017
,
Jun 26 2017
I wonder how widespread this problem is. Ojan, do you happen to have some examples or some data?
,
Jun 26 2017
No data. The only examples I know of are google products with chat: hangouts, gmail, inbox. I know there are others out there, but this is just the anecdata I run into with my own browsing.
,
Jun 29 2017
The NextAction date has arrived: 2017-06-29
,
May 8 2018
|
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by ojan@chromium.org
, Jun 21 2017