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

Unified Diff: content/browser/indexed_db/indexed_db_backing_store.cc

Issue 2760163002: [IndexedDB] Pool and evict leveldb iterators, to save memory (Closed)
Patch Set: comments & lifetime fix Created 3 years, 9 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: content/browser/indexed_db/indexed_db_backing_store.cc
diff --git a/content/browser/indexed_db/indexed_db_backing_store.cc b/content/browser/indexed_db/indexed_db_backing_store.cc
index ffb0f8fc5f69577c84d32e8805a742aa6649faf5..00e22b7700f28fe2e6c1ec2bb86e64854110f615 100644
--- a/content/browser/indexed_db/indexed_db_backing_store.cc
+++ b/content/browser/indexed_db/indexed_db_backing_store.cc
@@ -58,6 +58,7 @@ using url::Origin;
namespace content {
namespace {
+static const size_t kDefaultMaxOpenIteratorsPerDatabase = 50;
pwnall 2017/03/24 09:16:02 How about explaining that we do this because every
dmurph 2017/03/24 23:33:39 Done.
enum IndexedDBBackingStoreErrorSource {
// 0 - 2 are no longer used.
@@ -1064,7 +1065,9 @@ class DefaultLevelDBFactory : public LevelDBFactory {
const LevelDBComparator* comparator,
std::unique_ptr<LevelDBDatabase>* db,
bool* is_disk_full) override {
- return LevelDBDatabase::Open(file_name, comparator, db, is_disk_full);
+ return LevelDBDatabase::Open(file_name, comparator, db,
+ kDefaultMaxOpenIteratorsPerDatabase,
+ is_disk_full);
}
Status DestroyLevelDB(const FilePath& file_name) override {
return LevelDBDatabase::Destroy(file_name);

Powered by Google App Engine
This is Rietveld 408576698