1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

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
This commit is contained in:
drh
2019-12-13 16:04:52 +00:00
parent e6068027ca
commit d335bc40a6
3 changed files with 17 additions and 8 deletions

View File

@@ -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