Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(733)

Unified Diff: net/disk_cache/simple/simple_entry_impl.h

Issue 2872943002: [SimpleCache] Prefetch stream 1 so that the first read is faster
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/disk_cache/simple/simple_entry_impl.h
diff --git a/net/disk_cache/simple/simple_entry_impl.h b/net/disk_cache/simple/simple_entry_impl.h
index 4cb1019f9ac81f2769357c73ae96a27f6b4b324e..9280d61ce5ddf2bddfeecf8a8bd28a8b1b1e809e 100644
--- a/net/disk_cache/simple/simple_entry_impl.h
+++ b/net/disk_cache/simple/simple_entry_impl.h
@@ -391,6 +391,11 @@ class NET_EXPORT_PRIVATE SimpleEntryImpl : public Entry,
// used to write HTTP headers, the memory consumption of keeping it in memory
// is acceptable.
scoped_refptr<net::GrowableIOBuffer> stream_0_data_;
+
+ // Some stream 1 data is prefetched when stream 0 is first read, to make the
+ // first read call on stream 1 synchronous. If a write to any stream occurs
+ // on the entry the prefetch buffer is no longer used.
+ scoped_refptr<net::GrowableIOBuffer> stream_1_prefetch_data_;
};
} // namespace disk_cache
« no previous file with comments | « no previous file | net/disk_cache/simple/simple_entry_impl.cc » ('j') | net/disk_cache/simple/simple_synchronous_entry.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698