When cobalt
run into background mode by suspend, it will still cost about 80M memory(about 130M memory at foreground
), it used too much memory in background mode, so where does it cost so much memory in background mode, in which part does it cost? Is there a plan to improve it?
When Cobalt goes into Suspended mode, it releases all GPU resources - image caches, swap chain, etc. It also shuts down the SbPlayer, freeing those resources.
All Javascript, DOM, and CSS memory is retained, so the HTML5 application does not need to be reloaded when Resumed.
Perhaps unexpectedly, the MediaSource buffers are also retained. This is so that it can resume playback immediately on resume. This is mainly because the application isn't notified that it is being suspended, so Cobalt has to secretly restore the media element state on Resume.
The media source buffers can be a lot of memory, around 24 megs at 1080p, and 60-80 for 4k.