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

Unified Diff: third_party/sqlite/patches/0003-Use-seperate-page-cache-pools-for-each-sqlite-connec.patch

Issue 949043002: Add //third_party/sqlite to dirs_to_snapshot, remove net_sql.patch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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: third_party/sqlite/patches/0003-Use-seperate-page-cache-pools-for-each-sqlite-connec.patch
diff --git a/third_party/sqlite/patches/0003-Use-seperate-page-cache-pools-for-each-sqlite-connec.patch b/third_party/sqlite/patches/0003-Use-seperate-page-cache-pools-for-each-sqlite-connec.patch
new file mode 100644
index 0000000000000000000000000000000000000000..d2678e76e44d521e871b8e3ea80704a4a1cf02cf
--- /dev/null
+++ b/third_party/sqlite/patches/0003-Use-seperate-page-cache-pools-for-each-sqlite-connec.patch
@@ -0,0 +1,44 @@
+From 3a6d9302ff14aec82291c7e2212ce37b7453ce9f Mon Sep 17 00:00:00 2001
+From: rmcilroy <rmcilroy@chromium.org>
+Date: Thu, 20 Jun 2013 22:50:12 +0000
+Subject: [PATCH 03/16] Use seperate page-cache pools for each sqlite
+ connection.
+
+Due to multiple different subsystems using sqlite, the shared global page
+cache policy does not suite our use-cases on Chrome very well. This CL
+enables a compile time flag to be set to disable shared cache pools.
+
+BUG=243769
+
+Original review URL: https://chromiumcodereview.appspot.com/17413004
+---
+ third_party/sqlite/src/src/pcache1.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/third_party/sqlite/src/src/pcache1.c b/third_party/sqlite/src/src/pcache1.c
+index a8c3217..3fcee4b 100644
+--- a/third_party/sqlite/src/src/pcache1.c
++++ b/third_party/sqlite/src/src/pcache1.c
+@@ -567,6 +567,8 @@ static sqlite3_pcache *pcache1Create(int szPage, int szExtra, int bPurgeable){
+ ** PGroup. In other words, separateCache is true for mode (1) where no
+ ** mutexing is required.
+ **
++ ** * Always use separate caches (mode-1) if SQLITE_SEPARATE_CACHE_POOLS
++ **
+ ** * Always use a unified cache (mode-2) if ENABLE_MEMORY_MANAGEMENT
+ **
+ ** * Always use a unified cache in single-threaded applications
+@@ -574,7 +576,9 @@ static sqlite3_pcache *pcache1Create(int szPage, int szExtra, int bPurgeable){
+ ** * Otherwise (if multi-threaded and ENABLE_MEMORY_MANAGEMENT is off)
+ ** use separate caches (mode-1)
+ */
+-#if defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) || SQLITE_THREADSAFE==0
++#ifdef SQLITE_SEPARATE_CACHE_POOLS
++ const int separateCache = 1;
++#elif defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) || SQLITE_THREADSAFE==0
+ const int separateCache = 0;
+ #else
+ int separateCache = sqlite3GlobalConfig.bCoreMutex>0;
+--
+2.2.1
+

Powered by Google App Engine
This is Rietveld 408576698