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

Unified Diff: content/browser/dom_storage/session_storage_database.cc

Issue 1668463003: Set DOM Storage buffer size so that not everything ends up in RAM (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/dom_storage/session_storage_database.cc
diff --git a/content/browser/dom_storage/session_storage_database.cc b/content/browser/dom_storage/session_storage_database.cc
index ec246164e3404561df14a267ada5c019bd5ba941..0aea7c7cc34f11ec20da8372199eaf8871654305 100644
--- a/content/browser/dom_storage/session_storage_database.cc
+++ b/content/browser/dom_storage/session_storage_database.cc
@@ -383,6 +383,9 @@ leveldb::Status SessionStorageDatabase::TryToOpen(leveldb::DB** db) {
options.max_open_files = 0; // Use minimum.
options.create_if_missing = true;
options.reuse_logs = leveldb_env::kDefaultLogReuseOptionValue;
+ // Default write_buffer_size is 4 MB but that might leave a 3.999
+ // memory allocation in RAM from a log file recovery.
+ options.write_buffer_size = 64 * 1024;
cmumford 2016/02/03 21:34:51 64K is the minimum, so this will work, but it will
return leveldb::DB::Open(options, file_path_.AsUTF8Unsafe(), db);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698