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
+4 -1
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
+2 -1
View File
@@ -11,11 +11,12 @@
# This file implements regression tests for SQLite library. The
# focus of this script is measuring executing speed.
#
# $Id: speed1.test,v 1.6 2008/07/24 23:34:07 drh Exp $
# $Id: speed1.test,v 1.7 2008/07/28 19:34:54 drh Exp $
#
sqlite3_shutdown
sqlite3_config_scratch 29000 1
sqlite3_config_lookaside 1000 300
set testdir [file dirname $argv0]
source $testdir/tester.tcl
speed_trial_init speed1