NEW 83636
ImageLoader blindly creates CachedImages in the manually-loading case without looking in or updating the memory cache
https://bugs.webkit.org/show_bug.cgi?id=83636
Summary ImageLoader blindly creates CachedImages in the manually-loading case without...
Tim Horton
Reported 2012-04-10 16:27:55 PDT
<rdar://problem/11213825> This causes us to spend a lot of time/memory re-decoding an image when loaded as an ImageDocument (the manually-loading case, since the main resource is the image being loaded) in multiple tabs/etc.
Attachments
preliminary patch (16.41 KB, patch)
2012-04-10 16:41 PDT, Tim Horton
no flags
style + #1 (16.39 KB, patch)
2012-04-10 17:05 PDT, Tim Horton
no flags
Tim Horton
Comment 1 2012-04-10 16:41:43 PDT
Created attachment 136571 [details] preliminary patch Preliminary patch, needs a few things: 1. bool argument on requestResource should probably be an enum (or use the enum from ResourceLoaderOptions?) for cleanliness. 2. I'm not sure about the naming of the new ResourceLoaderOption (AutomaticLoadPolicy { LoadAutomatically, LoadManually }). 3. I haven't looked into how to add a test for this yet.
WebKit Review Bot
Comment 2 2012-04-10 16:44:51 PDT
Attachment 136571 [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/WebCore/loader/ImageLoader.cpp:172: Missing space before ( in if( [whitespace/parens] [5] Total errors found: 1 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
Tim Horton
Comment 3 2012-04-10 17:05:29 PDT
Created attachment 136576 [details] style + #1
Brady Eidson
Comment 4 2012-04-10 17:30:24 PDT
(In reply to comment #1) > Created an attachment (id=136571) [details] > preliminary patch > > Preliminary patch, needs a few things: > ... > 3. I haven't looked into how to add a test for this yet. It will almost certainly need to be an API test that watches resource identifiers to make sure we reuse the same resource instead of recreating it.
Brady Eidson
Comment 5 2012-04-11 10:40:59 PDT
This is actually in radar as <rdar://problem/9611285>
Note You need to log in before you can comment on or make changes to this bug.