[Webkit-unassigned] [Bug 76225] Release WebGL contexts eagerly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 12 16:30:30 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=76225


Kenneth Russell <kbr at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|webkit-unassigned at lists.web |kbr at google.com
                   |kit.org                     |




--- Comment #18 from Kenneth Russell <kbr at google.com>  2012-07-12 16:30:30 PST ---
I've investigated the resource leak with the WebGL stress tests from NVIDIA attached to http://code.google.com/p/chromium/issues/detail?id=128484 . It's happening only in Chrome, and because full GCs aren't occurring often enough. Plenty of young generation scavenges occur, but the canvases and their associated WebGLRenderingContexts are only collected upon full GC. (Even if they could be collected in scavenges, these objects might be promoted to the old generation, in which case they would only be collected during a full GC.)

I also tested with the context-creation-and-destruction.html stress test in the WebGL conformance suite. In this test case we would also like to collect the canvases and contexts more eagerly.

After consideration, the behavior we want is to simply tell the garbage collector to run soon after WebGL context creation. WebGL context creation is already a relatively expensive operation, so even though forcing a GC is a not insignificant cost, we do not expect real applications to be impacted.

The other solutions considered above, such as triggering an event if the canvas is removed from the web page, don't really address the problem. For example, it's perfectly valid for a canvas to be used for WebGL rendering even if it isn't added to the document.

JSC seems to GC often enough that it isn't affected by these issues, but I'd still like to hint its garbage collector to run soon after a WebGL context is created so that if its GC algorithm is ever adjusted, the behavior for collection of WebGL contexts doesn't change significantly.

Patch forthcoming which implements this.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list