Bug 141069 - Optimize MemoryCache::getSessionMap() a bit
Summary: Optimize MemoryCache::getSessionMap() a bit
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: 141091
Blocks:
  Show dependency treegraph
 
Reported: 2015-01-29 22:34 PST by Chris Dumez
Modified: 2015-01-30 17:39 PST (History)
8 users (show)

See Also:


Attachments
Patch (5.22 KB, patch)
2015-01-29 22:38 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (7.89 KB, patch)
2015-01-30 14:47 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (7.94 KB, patch)
2015-01-30 16:15 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (7.94 KB, patch)
2015-01-30 16:45 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-29 22:34:52 PST
Optimize MemoryCache::getSessionMap() a bit
Comment 1 Chris Dumez 2015-01-29 22:38:06 PST
Created attachment 245696 [details]
Patch
Comment 2 Anders Carlsson 2015-01-30 07:19:11 PST
Comment on attachment 245696 [details]
Patch

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

> Source/WebCore/loader/cache/MemoryCache.cpp:80
> +    std::unique_ptr<CachedResourceMap>& map = m_sessionResources.add(sessionID, nullptr).iterator->value;

auto& map =

> Source/WebCore/loader/cache/MemoryCache.h:187
> -    CachedResourceMap& getSessionMap(SessionID);
> +    CachedResourceMap& sessionResources(SessionID = SessionID::defaultSessionID());

I think it's better to be explicit about which session we want here, otherwise it's easy to always use the default session.
Comment 3 Chris Dumez 2015-01-30 09:43:41 PST
Committed r179403: <http://trac.webkit.org/changeset/179403>
Comment 5 WebKit Commit Bot 2015-01-30 12:42:06 PST
Re-opened since this is blocked by bug 141091
Comment 6 Chris Dumez 2015-01-30 14:02:08 PST
Rolled out in <http://trac.webkit.org/changeset/179410>. I'll propose another fix.
Comment 7 Chris Dumez 2015-01-30 14:47:13 PST
Created attachment 245746 [details]
Patch
Comment 8 Chris Dumez 2015-01-30 14:47:55 PST
New version of the patch will no longer causes any assertion hit in HashTable code.
Comment 9 Chris Dumez 2015-01-30 16:15:20 PST
Created attachment 245752 [details]
Patch
Comment 10 Chris Dumez 2015-01-30 16:45:59 PST
Created attachment 245759 [details]
Patch
Comment 11 WebKit Commit Bot 2015-01-30 17:39:27 PST
Comment on attachment 245759 [details]
Patch

Clearing flags on attachment: 245759

Committed r179431: <http://trac.webkit.org/changeset/179431>
Comment 12 WebKit Commit Bot 2015-01-30 17:39:32 PST
All reviewed patches have been landed.  Closing bug.