Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Issue 1302713003: Don't register excessive pending SVG resources (Closed)

Created:
5 years, 4 months ago by fs
Modified:
5 years, 4 months ago
Reviewers:
pdr., f(malita)
CC:
blink-reviews, blink-reviews-rendering, krit, eae+blinkwatch, f(malita), fs, gyuyoung2, jchaffraix+rendering, kouhei+svg_chromium.org, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, Stephen Chennney, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Don't register excessive pending SVG resources When an SVG resource was destroyed, it would notify the SVGResourcesCache, which would walk the entire cache, notify the layout object and add a "pending" entry for the id referring to the corresponding element. This would mean that every layout object which had any kind of resource would get a "pending" reference from every id to itself - regardless of if it ever referred to a resource with the given id. In the particular test, this resulted in a fairly large (ever-growing) "pending" element sets because there was persistent resource references in the document. Fix by only adding "pending" entries for the current clients of the resource that's being destroyed. SVGResourcesCache::resourceDestroyed is removed in favor of new method detachAllClients() in LayoutSVGResourceContainer. The part that unregistered the resource itself as a client is removed in favor of the pre-existing call to clientDestroyed() already existing in LayoutSVGModelObject::willBeDestroyed (delegated to from the resource.) SVGResources::resourceDestroyed is changed to not call removeAllClientsFromCache() on the resource being passed - this is instead done once after having cleared the references in all the clients. With this change, the "cycle time" of the test in the bug changes from linearly increasing to constant. BUG=521334 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=200840

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -49 lines) Patch
M Source/core/layout/svg/LayoutSVGResourceContainer.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/layout/svg/LayoutSVGResourceContainer.cpp View 3 chunks +23 lines, -2 lines 0 comments Download
M Source/core/layout/svg/SVGResources.cpp View 1 chunk +8 lines, -24 lines 0 comments Download
M Source/core/layout/svg/SVGResourcesCache.h View 1 chunk +0 lines, -3 lines 0 comments Download
M Source/core/layout/svg/SVGResourcesCache.cpp View 1 chunk +0 lines, -20 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
fs
5 years, 4 months ago (2015-08-19 16:06:30 UTC) #2
pdr.
Amazing. LGTM
5 years, 4 months ago (2015-08-19 16:43:41 UTC) #3
f(malita)
LGTM++
5 years, 4 months ago (2015-08-19 17:56:31 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1302713003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1302713003/1
5 years, 4 months ago (2015-08-19 17:56:51 UTC) #6
commit-bot: I haz the power
5 years, 4 months ago (2015-08-19 19:00:44 UTC) #7
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://src.chromium.org/viewvc/blink?view=rev&revision=200840

Powered by Google App Engine
This is Rietveld 408576698