aboutsummaryrefslogtreecommitdiff
path: root/src/global.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2019-12-13 16:04:52 +0000
committerdrh <drh@noemail.net>2019-12-13 16:04:52 +0000
commitd335bc40a6576d8759466d8efaaaf82b04667aaa (patch)
tree0b386ac43403c67d9b04dcbd86afe9e62ece0edb /src/global.c
parente6068027ca584a1263d2d659f48eded07fc4a297 (diff)
downloadsqlite-d335bc40a6576d8759466d8efaaaf82b04667aaa.tar.gz
sqlite-d335bc40a6576d8759466d8efaaaf82b04667aaa.zip
Change the default lookaside configuration to 40 slots of 1200-bytes each.
This actually works out to 30 big slots and 93 small slots using the mini-lookaside allocator. We get the same (or better) lookaside coverage but with 72KB less memory per connection. FossilOrigin-Name: 47b71a84d1262c4bf6ad4f4a91820fd63593f08ae9efa144199d44972225e073
Diffstat (limited to 'src/global.c')
-rw-r--r--src/global.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/global.c b/src/global.c
index 4689e94bb..570002be4 100644
--- a/src/global.c
+++ b/src/global.c
@@ -190,9 +190,18 @@ const unsigned char sqlite3CtypeMap[256] = {
** changed as start-time using sqlite3_config(SQLITE_CONFIG_LOOKASIDE)
** or at run-time for an individual database connection using
** sqlite3_db_config(db, SQLITE_DBCONFIG_LOOKASIDE);
+**
+** With the mini-lookaside enhancement, must less lookaside is required.
+** The default configuration of 1200,40 actually proves 30 1200-byte slots
+** and 93 128-byte slots, which is more lookaside slots that are available
+** using the older 1200,100 configuration without mini-lookaside.
*/
#ifndef SQLITE_DEFAULT_LOOKASIDE
-# define SQLITE_DEFAULT_LOOKASIDE 1200,100
+# ifdef SQLITE_OMIT_MINI_LOOKASIDE
+# define SQLITE_DEFAULT_LOOKASIDE 1200,100 /* 120KB of memory */
+# else
+# define SQLITE_DEFAULT_LOOKASIDE 1200,40 /* 48KB of memory */
+# endif
#endif