WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
98684
SVGResourcesCache::addResourcesFromRenderObject should not allocate SVGResources unconditionally
https://bugs.webkit.org/show_bug.cgi?id=98684
Summary
SVGResourcesCache::addResourcesFromRenderObject should not allocate SVGResour...
Eric Seidel (no email)
Reported
2012-10-08 13:41:10 PDT
SVGResourcesCache::addResourcesFromRenderObject should not allocate SVGResources unconditionally malloc() is very expensive. addResourcesFromRenderObject unconditionally malloc's an SVGResources object, even though its not needed much of the time. This causes fastMalloc to be one of the top samples in PerformanceTests/SVG/SvgNestedUse.html Fixing this is a slightly involved change, as we'll either need to make SVGResources::buildCachedResources static, and return a PassOwnPtr<SVGResources> or we need a separate method to check if we need an SVGResources in the first place. Relatedly, I think buildCachedResources is too long, and could be cleaned up to be more readable. :)
Attachments
Add attachment
proposed patch, testcase, etc.
Ahmad Saleem
Comment 1
2022-10-22 05:14:49 PDT
Fixed in following:
https://src.chromium.org/viewvc/blink?view=revision&revision=163121
Rob Buis
Comment 2
2023-10-15 03:42:16 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/19094
Ahmad Saleem
Comment 3
2023-10-15 07:23:19 PDT
Performance Test Case mentioned in
Comment 0
:
https://jsfiddle.net/gy16bv0t/show
EWS
Comment 4
2023-10-16 22:37:00 PDT
Committed
269397@main
(236dd9dd2c2c): <
https://commits.webkit.org/269397@main
> Reviewed commits have been landed. Closing PR #19094 and removing active labels.
Radar WebKit Bug Importer
Comment 5
2023-10-16 22:37:14 PDT
<
rdar://problem/117056723
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug