Bug 154776 - [iOS] Discard decoded image data on top-level navigation.
Summary: [iOS] Discard decoded image data on top-level navigation.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords: Performance
Depends on:
Blocks:
 
Reported: 2016-02-27 08:26 PST by Andreas Kling
Modified: 2016-02-27 09:49 PST (History)
3 users (show)

See Also:


Attachments
Patch (3.78 KB, patch)
2016-02-27 08:35 PST, Andreas Kling
no flags Details | Formatted Diff | Diff
Patch (3.56 KB, patch)
2016-02-27 08:36 PST, Andreas Kling
andersca: review+
Details | Formatted Diff | Diff
Patch for landing (3.56 KB, patch)
2016-02-27 08:59 PST, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2016-02-27 08:26:21 PST
We can significantly reduce peak memory usage by dropping decoded image data between pages.
Most images won't be reused, and if any are, they can be re-decoded at low cost.
Comment 1 Andreas Kling 2016-02-27 08:35:14 PST
Created attachment 272415 [details]
Patch
Comment 2 WebKit Commit Bot 2016-02-27 08:36:09 PST
Attachment 272415 [details] did not pass style-queue:


ERROR: Source/WebCore/loader/cache/MemoryCache.cpp:285:  One line control clauses should not use braces.  [whitespace/braces] [4]
Total errors found: 1 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Andreas Kling 2016-02-27 08:36:38 PST
Created attachment 272416 [details]
Patch
Comment 4 WebKit Commit Bot 2016-02-27 08:38:41 PST
Attachment 272416 [details] did not pass style-queue:


ERROR: Source/WebCore/loader/cache/MemoryCache.cpp:285:  One line control clauses should not use braces.  [whitespace/braces] [4]
Total errors found: 1 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Anders Carlsson 2016-02-27 08:50:39 PST
Comment on attachment 272416 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=272416&action=review

> Source/WebCore/loader/cache/MemoryCache.h:105
> +    void forEachResource(std::function<void(CachedResource&)>);

Would make this const& to avoid copying.
Comment 6 Andreas Kling 2016-02-27 08:59:37 PST
Created attachment 272417 [details]
Patch for landing
Comment 7 WebKit Commit Bot 2016-02-27 09:49:23 PST
Comment on attachment 272417 [details]
Patch for landing

Clearing flags on attachment: 272417

Committed r197254: <http://trac.webkit.org/changeset/197254>
Comment 8 WebKit Commit Bot 2016-02-27 09:49:27 PST
All reviewed patches have been landed.  Closing bug.