Status: Assigned
Owner: [email protected]
CC: [email protected],  [email protected],  [email protected],   
[email protected],  [email protected]
Labels: Type-Bug Pri-1 OS-All Area-BrowserBackend Size-Large Jank Mstone-4

New issue 23400 by [email protected]: Flush everything we can from  
memory on suspend/sleep
http://code.google.com/p/chromium/issues/detail?id=23400

We have a little-used class called SystemMonitor::PowerObserver that can be
subclassed if you want to be notified just before sleep or just after wake.
Because the system pages everything out on sleep, it makes sense to flush
everything we possibly can from memory when we get this notice, because
swapping it back in when the user wakes the system and starts interacting
with us will be very slow and contentious.

Here are things we should definitely try to do:
* For the browser process:
   * Commit all the sqlite databases and unload them from memory; at the
very least, do this with the history system, then use the prefetch trick to
reload it on wake.
   * Dump the spellcheck dictionary.
   * Tell tcmalloc to free everything it can.  (This is vague since it's not
clear to me what this means; Jim, Mike, and Anton will know more here.
Also, do we need to do this in each renderer process too?)

* For each renderer process:
   * Repeatedly call the V8 idle notification until it returns true
("nothing more to free").  Note that it makes more sense to do this than to
implement a new "delete everything" pass because object references make it
difficult to free everything possible in just one pass.
   * Tell the WebCore cache manager to set its global limit to 0, which
should flush the image/script/css/etc. caches.
   * Destroy the host-side font caches.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to