Bug 75487

Summary: [chromium] Signal WebView to release recoverable resources if it is unlikely to be visible soon.
Product: WebKit Reporter: Michal Mocny <mmocny>
Component: New BugsAssignee: Michal Mocny <mmocny>
Status: RESOLVED INVALID    
Severity: Normal CC: cc-bugs, dglazkov, fishd, jamesr, levin+threading, nduca, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Michal Mocny
Reported 2012-01-03 13:09:01 PST
[chromium][not for review] Adding hibernateCHROMIUM extension to support more aggressive resource dealocation of tabs.
Attachments
Patch (5.80 KB, patch)
2012-01-03 13:12 PST, Michal Mocny
no flags
Patch (20.61 KB, patch)
2012-01-13 13:50 PST, Michal Mocny
no flags
Patch (18.27 KB, patch)
2012-01-16 10:27 PST, Michal Mocny
no flags
Patch (20.39 KB, patch)
2012-01-18 12:30 PST, Michal Mocny
no flags
Patch (18.14 KB, patch)
2012-01-19 12:52 PST, Michal Mocny
no flags
Michal Mocny
Comment 1 2012-01-03 13:12:47 PST
WebKit Review Bot
Comment 2 2012-01-03 13:17:44 PST
Attachment 120983 [details] did not pass style-queue: Failed to run "['Tools/Scripts/update-webkit']" exit_code: 9 Updating OpenSource Index mismatch: 3a7674dadd24ecd6a1b023eba203ecf2ed62fc59 != edb861612940a3244431d239dacdbc36317b627c rereading e1e2538cff7d320c2b7cc22c0b75c9369ce9cdb2 A LayoutTests/svg/custom/webkit-transform-crash.html A LayoutTests/svg/custom/webkit-transform-crash-expected.txt M LayoutTests/ChangeLog M Source/WebCore/ChangeLog M Source/WebCore/svg/SVGStyledTransformableElement.cpp 103950 = 8282a1d85ad097ce4064a5896912bdb211b115e6 already exists! Why are we refetching it? at /usr/lib/git-core/git-svn line 5210 Died at Tools/Scripts/update-webkit line 158. If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Review Bot
Comment 3 2012-01-03 14:26:01 PST
Comment on attachment 120983 [details] Patch Attachment 120983 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/11070156
Michal Mocny
Comment 4 2012-01-13 13:50:05 PST
WebKit Review Bot
Comment 5 2012-01-13 13:52:21 PST
Please wait for approval from fishd@chromium.org before submitting because this patch contains changes to the Chromium public API.
Darin Fisher (:fishd, Google)
Comment 6 2012-01-13 14:09:38 PST
(In reply to comment #5) > Please wait for approval from fishd@chromium.org before submitting because this patch contains changes to the Chromium public API. I defer to KBR for this API change.
WebKit Review Bot
Comment 7 2012-01-13 15:24:10 PST
Comment on attachment 122492 [details] Patch Attachment 122492 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/11152746
Michal Mocny
Comment 8 2012-01-16 07:30:26 PST
I put some more thought into this over the weekend, and no longer thinking page visibility is the correct direction to go here. "hibernation" as I've named it here is not really hibernation, it is just a signal to enter a more thorough visible(false). The state of the tab remains simply "hidden". Additionally, there may one day be need for a real "hibernated" state, when background tabs actually go idle and drop resources which have user visible side effects. I'll make the relevant changes.
Michal Mocny
Comment 9 2012-01-16 10:27:51 PST
WebKit Review Bot
Comment 10 2012-01-16 10:30:48 PST
Attachment 122662 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebKit/chromium/src/WebViewImpl.cpp:3181: One line control clauses should not use braces. [whitespace/braces] [4] Total errors found: 1 in 22 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Review Bot
Comment 11 2012-01-16 19:10:48 PST
Comment on attachment 122662 [details] Patch Attachment 122662 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/11269035
Michal Mocny
Comment 12 2012-01-17 06:45:22 PST
Comment on attachment 122662 [details] Patch setting r-
Michal Mocny
Comment 13 2012-01-18 12:30:55 PST
WebKit Review Bot
Comment 14 2012-01-18 12:45:38 PST
Comment on attachment 122975 [details] Patch Attachment 122975 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/11211758
Michal Mocny
Comment 15 2012-01-18 12:51:02 PST
Comment on attachment 122975 [details] Patch review- again, sorry
Michal Mocny
Comment 16 2012-01-19 12:52:14 PST
Michal Mocny
Comment 17 2012-01-19 12:57:37 PST
Refactored to: - remove the WGC3D changes, which are currently landing separately (see https://bugs.webkit.org/show_bug.cgi?id=76634). - rename "UnlikelyTo.." to "releaseResources" - finish plumbing for threaded compositor There is a FIXME listed in this CL for updating hooks to use WGC3D releaseResources extension once that patch lands. This patch could land independently, but since it would do nothing useful, may as well wait+update and land in one go. Still, that change will be trivial and the bulk of the review may as well start now.
Nat Duca
Comment 18 2012-01-19 22:23:17 PST
Comment on attachment 123180 [details] Patch I think we're headed the wrong direction here. If I understand right, releaseResources is called via IPC from the browser process? Where? The RenderWidgetHostView? Before we make this so drastically explicit, I think we need to consider adding resource managment extensions to GL. The GL process knows when it is interacting with a renderwidget --- renderwidgethostviews can directly IPC to the GPU process. I think it may be more effective for the RWHVs to keep the GPU process up to date on surfaces' "recentness" and "visibility" and then use that information to push a memory **limit** to each renderer-side GL context.
Nat Duca
Comment 19 2012-03-28 18:51:12 PDT
What the heck? I'm so confused now. Who is using these resources? This makes no sense at all.
Nat Duca
Comment 20 2012-03-28 18:56:35 PDT
SDHFSHFSJFH I see the problem. Discard framebuffer is implemented wrong. Its done as an IPC. It needs to be a command buffer operation so it executes inline with other GL commands.
James Robinson
Comment 21 2012-03-28 20:12:49 PDT
Not sure I follow - flushes are IPCs and have offsets and all IPCs should be processed in order, so that in itself shouldn't be a problem. Should we take this to a crbug?
Nat Duca
Comment 22 2012-03-28 20:13:26 PDT
Note You need to log in before you can comment on or make changes to this bug.