Anyone know if there is detailed documentation on the Chrome "Tab Discarding" feature? I'd like to understand the conditions and system attributes that prompt a tab to stop and get reloaded so I can structure my application code correctly.
My issue:
- I have a music player which loads and plays songs in Chrome using webaudio framework even with the tab in the background and the mobile device screen off.
- On certain devices, the JS on the chrome tab stops (music stops) and the tab gets reloaded at a certain point during play back. This varies with memory usage.
The application has a song cache that holds up to N tracks (I'm not calculating actual memory yet). With N = 10, the application tab is discarded pretty quickly after the mobile device is shut off. At N = 4, the app plays for a long time (> 1 hour) until, at some point, I'm guessing I run out of memory due to the app being inefficient, or more likely, the combined size of the 4 songs in memory exceeding some tab-discard limit.
I'd like to get the detailed behavior of Tab Discard (or whatever is affecting my app), so I can set runtime params correctly and operate within memory bounds (if any).