| Summary: | [WK2] Prune more resources from the MemoryCache before process suspension | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||||||||||||
| Component: | WebKit2 | Assignee: | Chris Dumez <cdumez> | ||||||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||||||
| Severity: | Normal | CC: | barraclough, commit-queue, ggaren, kling | ||||||||||||||||
| Priority: | P2 | ||||||||||||||||||
| Version: | 528+ (Nightly build) | ||||||||||||||||||
| Hardware: | Unspecified | ||||||||||||||||||
| OS: | Unspecified | ||||||||||||||||||
| Attachments: |
|
||||||||||||||||||
|
Description
Chris Dumez
2015-06-03 22:28:42 PDT
Created attachment 254246 [details]
Patch
Created attachment 254247 [details]
Patch
Created attachment 254249 [details]
Patch
Created attachment 254251 [details]
Patch
Created attachment 254253 [details]
Patch
Ah, green bubbles :) Created attachment 254267 [details]
Patch
Comment on attachment 254267 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=254267&action=review r=me this is great. > Source/WebCore/platform/MemoryPressureHandler.cpp:148 > + // Do a full sweep of collected objects. Sidenote (not really about this patch): If we take the garbageCollectNow() path above, it will do a full sweep before returning. If we take the garbageCollectSoon() path, it won't generate any new garbage to sweep, since it only accelerates the next collection, but will never actually perform it. What will happen here is that if we recently did a collection that generated work for the IncrementalSweeper and that work is not yet finished, it will synchronously finish now. I think it's a good thing to be doing here, just wanted to clarify what's really going on. (In reply to comment #8) > Comment on attachment 254267 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=254267&action=review > > r=me this is great. > > > Source/WebCore/platform/MemoryPressureHandler.cpp:148 > > + // Do a full sweep of collected objects. > > Sidenote (not really about this patch): > > If we take the garbageCollectNow() path above, it will do a full sweep > before returning. I wasn't aware, I'll tweak the code accordingly before landing. > If we take the garbageCollectSoon() path, it won't generate any new garbage > to sweep, since it only accelerates the next collection, but will never > actually perform it. > What will happen here is that if we recently did a collection that generated > work for the IncrementalSweeper and that work is not yet finished, it will > synchronously finish now. > I think it's a good thing to be doing here, just wanted to clarify what's > really going on. It was my understanding that this still was useful. Ideally, we would pass a callback to garbageCollectSoon() so that we can do a sweep and prune dead resources from the memory cache once finished. Created attachment 254270 [details]
Patch
Comment on attachment 254270 [details] Patch Clearing flags on attachment: 254270 Committed r185206: <http://trac.webkit.org/changeset/185206> All reviewed patches have been landed. Closing bug. |