1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-01 06:27:03 +03:00

Implement the "lookaside" memory allocation cache. Use of this cache makes

the speed1.test script run about 15% faster.  Added new interfaces to
control the cache. (CVS 5488)

FossilOrigin-Name: e48f9697e9fea339e150ddc32940760027dd07d9
This commit is contained in:
drh
2008-07-28 19:34:53 +00:00
parent 78bd9ca86f
commit 633e6d57d9
50 changed files with 999 additions and 624 deletions

View File

@ -11,7 +11,7 @@
#
# This file contains tests of the memory allocation subsystem
#
# $Id: memsubsys1.test,v 1.5 2008/07/25 13:39:08 drh Exp $
# $Id: memsubsys1.test,v 1.6 2008/07/28 19:34:54 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -26,6 +26,7 @@ proc build_test_db {testname pragmas} {
catch {db close}
file delete -force test.db test.db-journal
sqlite3 db test.db
sqlite3_db_config_lookaside db 0 0
db eval $pragmas
db eval {
CREATE TABLE t1(x, y);
@ -49,6 +50,7 @@ proc build_test_db {testname pragmas} {
#
db close
sqlite3_shutdown
sqlite3_config_lookaside 0 0
sqlite3_initialize
build_test_db memsubsys1-1 {PRAGMA page_size=1024}
do_test memsubsys1-1.3 {
@ -224,6 +226,7 @@ db close
sqlite3_shutdown
sqlite3_config_pagecache 0 0
sqlite3_config_scratch 0 0
sqlite3_config_lookaside 100 500
sqlite3_initialize
autoinstall_test_functions
finish_test