Bug 141110 - Use simpler CachedResourceMap structure in MemoryCache with CACHE_PARTITIONING enabled
Summary: Use simpler CachedResourceMap structure in MemoryCache with CACHE_PARTITIONIN...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-30 22:45 PST by Chris Dumez
Modified: 2021-10-02 01:17 PDT (History)
5 users (show)

See Also:


Attachments
Patch (14.56 KB, patch)
2015-01-30 22:52 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (14.95 KB, patch)
2015-01-31 13:17 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (14.95 KB, patch)
2015-01-31 13:18 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2015-01-30 22:45:51 PST
Use simpler CachedResourceMap structure in Memory with CACHE_PARTITIONING enabled. Previously, we would be using a HashMap of HashMap to store CachedResources. The outer HashMap would use the URL as key and the inner HashMap using the partition name as key. This would make traversing the structure overly complicated, especially considering that the code needs to traverse a simple HashMap if CACHE_PARTITIONING is disabled.

This patch updates the CachedResourceMap structure to be a simple HashMap, whose key is an std::pair<URL, String /* partitionName */>. Having a flat structure simplifies the traversal code a lot and enables more code sharing between CACHE_PARTITIONING and !CACHE_PARTITIONING. This shouldn't regress performance because we already have both a URL and a partition name when we need to look up a resource. We never need to retrieve all resources with a particular URL.
Comment 1 Chris Dumez 2015-01-30 22:52:11 PST
Created attachment 245773 [details]
Patch
Comment 2 Chris Dumez 2015-01-31 13:17:05 PST
Created attachment 245796 [details]
Patch
Comment 3 Chris Dumez 2015-01-31 13:18:53 PST
Created attachment 245797 [details]
Patch
Comment 4 Antti Koivisto 2015-01-31 18:33:53 PST
Comment on attachment 245797 [details]
Patch

nice
Comment 5 WebKit Commit Bot 2015-01-31 19:11:12 PST
Comment on attachment 245797 [details]
Patch

Clearing flags on attachment: 245797

Committed r179456: <http://trac.webkit.org/changeset/179456>
Comment 6 WebKit Commit Bot 2015-01-31 19:11:22 PST
All reviewed patches have been landed.  Closing bug.