Make NetworkCache::traverse faster
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 27 Jun 2015 08:52:58 +0000 (08:52 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 27 Jun 2015 08:52:58 +0000 (08:52 +0000)
commit7d05c8d1a90b76d31cf546886d153fb2c4e652bc
tree4c083eff3838a2eb1d120e07fa99d3dd83519e93
parent53319bfa0bbe51c4348b19b52ee460d157835a3a
Make NetworkCache::traverse faster
https://bugs.webkit.org/show_bug.cgi?id=146354

Reviewed by Anders Carlsson.

* NetworkProcess/cache/NetworkCacheIOChannel.h:
(WebKit::NetworkCache::IOChannel::path):
(WebKit::NetworkCache::IOChannel::type):
* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::open):
(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::write):
(WebKit::NetworkCache::IOChannel::readSync): Deleted.

    Not needed anymore.

* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):
(WebKit::NetworkCache::Storage::TraverseOperation::TraverseOperation):

    Add TraverseOperation, similar to Read/Write.

(WebKit::NetworkCache::Storage::open):
(WebKit::NetworkCache::Storage::traverse):

    Use async I/O.
    Use condition variable to allow maximum 5 parallel file reads.

* NetworkProcess/cache/NetworkCacheStorage.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannel.h
Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm
Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp
Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp
Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h