Chrome Tab Discard behavior on mobile devices

48 views
Skip to first unread message

John Wang

unread,
Mar 12, 2017, 4:27:20 AM3/12/17
to Chromium-discuss
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).

PhistucK

unread,
Mar 12, 2017, 4:29:16 AM3/12/17
to djmne...@gmail.com, Chromium-discuss
If you add the application to your home screen, does it last longer?


PhistucK

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+unsubscribe@chromium.org.

John Wang

unread,
Mar 13, 2017, 12:55:45 PM3/13/17
to Chromium-discuss, djmne...@gmail.com
Hm, not sure what you mean by adding application to the home screen. I'm not working with an application, I'm working with JS in a browser. 

Actually thinking about making a native client, but would like to figure out this issue if possible. 


PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

PhistucK

unread,
Mar 13, 2017, 2:10:37 PM3/13/17
to John Wang, Chromium-discuss
By "application" I meant "web application".
Chrome has a "Add to homescreen" feature in its menu which adds a shortcut to the website to the homescreen and opens it in a closer-to-native-application mode (full screen, an optional splash screen...).
That feature might also increase the (browser imposed) limits.
There is not much that can be done about operating system imposed limits, though.


PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+unsubscribe@chromium.org.

John Wang

unread,
Mar 13, 2017, 2:45:38 PM3/13/17
to Chromium-discuss, djmne...@gmail.com
Awesome, now I understand. Thanks for the info, going to try this out now. 


PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

Reply all
Reply to author
Forward
0 new messages