Bug 141297 - [WK2][Cocoa] Populate m_contentsFilter bloom filter from the main dispatch queue NetworkCacheStorage::initialize()
Summary: [WK2][Cocoa] Populate m_contentsFilter bloom filter from the main dispatch qu...
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-02-05 11:21 PST by Chris Dumez
Modified: 2015-02-05 13:48 PST (History)
4 users (show)

See Also:


Attachments
Patch (2.32 KB, patch)
2015-02-05 11:25 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-02-05 11:21:31 PST
Populate m_contentsFilter bloom filter from the main dispatch queue NetworkCacheStorage::initialize() to avoid thread-safety issues.
Comment 1 Chris Dumez 2015-02-05 11:25:51 PST
Created attachment 246116 [details]
Patch
Comment 2 Antti Koivisto 2015-02-05 13:05:43 PST
Comment on attachment 246116 [details]
Patch

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

> Source/WebKit2/NetworkProcess/cache/NetworkCacheStorageCocoa.mm:142
> +            dispatch_async(dispatch_get_main_queue(), [this, hash] {
> +                m_contentsFilter.add(hash);
> +            });

This gets called a lot so dispatching every item individually is not very optimal. But we can do better later if needed.
Comment 3 WebKit Commit Bot 2015-02-05 13:48:22 PST
Comment on attachment 246116 [details]
Patch

Clearing flags on attachment: 246116

Committed r179704: <http://trac.webkit.org/changeset/179704>
Comment 4 WebKit Commit Bot 2015-02-05 13:48:28 PST
All reviewed patches have been landed.  Closing bug.