OLD | NEW |
| (Empty) |
1 From 3a6d9302ff14aec82291c7e2212ce37b7453ce9f Mon Sep 17 00:00:00 2001 | |
2 From: rmcilroy <rmcilroy@chromium.org> | |
3 Date: Thu, 20 Jun 2013 22:50:12 +0000 | |
4 Subject: [PATCH 03/16] Use seperate page-cache pools for each sqlite | |
5 connection. | |
6 | |
7 Due to multiple different subsystems using sqlite, the shared global page | |
8 cache policy does not suite our use-cases on Chrome very well. This CL | |
9 enables a compile time flag to be set to disable shared cache pools. | |
10 | |
11 BUG=243769 | |
12 | |
13 Original review URL: https://chromiumcodereview.appspot.com/17413004 | |
14 --- | |
15 third_party/sqlite/src/src/pcache1.c | 6 +++++- | |
16 1 file changed, 5 insertions(+), 1 deletion(-) | |
17 | |
18 diff --git a/third_party/sqlite/src/src/pcache1.c b/third_party/sqlite/src/src/p
cache1.c | |
19 index a8c3217..3fcee4b 100644 | |
20 --- a/third_party/sqlite/src/src/pcache1.c | |
21 +++ b/third_party/sqlite/src/src/pcache1.c | |
22 @@ -567,6 +567,8 @@ static sqlite3_pcache *pcache1Create(int szPage, int szExtra
, int bPurgeable){ | |
23 ** PGroup. In other words, separateCache is true for mode (1) where no | |
24 ** mutexing is required. | |
25 ** | |
26 + ** * Always use separate caches (mode-1) if SQLITE_SEPARATE_CACHE_POOLS | |
27 + ** | |
28 ** * Always use a unified cache (mode-2) if ENABLE_MEMORY_MANAGEMENT | |
29 ** | |
30 ** * Always use a unified cache in single-threaded applications | |
31 @@ -574,7 +576,9 @@ static sqlite3_pcache *pcache1Create(int szPage, int szExtra
, int bPurgeable){ | |
32 ** * Otherwise (if multi-threaded and ENABLE_MEMORY_MANAGEMENT is off) | |
33 ** use separate caches (mode-1) | |
34 */ | |
35 -#if defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) || SQLITE_THREADSAFE==0 | |
36 +#ifdef SQLITE_SEPARATE_CACHE_POOLS | |
37 + const int separateCache = 1; | |
38 +#elif defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) || SQLITE_THREADSAFE==0 | |
39 const int separateCache = 0; | |
40 #else | |
41 int separateCache = sqlite3GlobalConfig.bCoreMutex>0; | |
42 -- | |
43 2.2.1 | |
44 | |
OLD | NEW |