From: drh Date: Thu, 12 Jan 2006 15:01:15 +0000 (+0000) Subject: Additional performance improvements in sqlite3BtreeMoveto. (CVS 2926) X-Git-Tag: version-3.6.10~3241 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d172f86fe258b31d5492a858cf176a6fee488652;p=thirdparty%2Fsqlite.git Additional performance improvements in sqlite3BtreeMoveto. (CVS 2926) FossilOrigin-Name: 52b3be96b6e96994ec6fbcc67bf355cd05f61730 --- diff --git a/manifest b/manifest index 44148ac6d6..074516701f 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C BtreeMoveto\soptimization\sgoes\sabout\s1.5%\sfaster.\s(CVS\s2925) -D 2006-01-12T14:30:19 +C Additional\sperformance\simprovements\sin\ssqlite3BtreeMoveto.\s(CVS\s2926) +D 2006-01-12T15:01:16 F Makefile.in ab3ffd8d469cef4477257169b82810030a6bb967 F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -34,7 +34,7 @@ F src/alter.c 4139c8f1d0f12b1759e767b1d09dd594e2b5ac1d F src/analyze.c 7d2b7ab9a9c2fd6e55700f69064dfdd3e36d7a8a F src/attach.c d4b9d8bd71d72409720946355be41cafb6c09079 F src/auth.c cdec356a5cd8b217c346f816c5912221537fe87f -F src/btree.c 9ac50babae65052bb7e412a5281f80d4e225b574 +F src/btree.c fdbb411805bf0c0087784a4daf95b4de1b469978 F src/btree.h 5663c4f43e8521546ccebc8fc95acb013b8f3184 F src/build.c a055974683ddc465bdc8669d43d6ab35d3dbb55f F src/callback.c ba3e6cc7a6beb562e7a66f92e26fabcb21aab1e2 @@ -340,7 +340,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513 -P 0caa1994770142d6ca15284a26bad3879b07b15a -R 6e451212b773e5c55266fd23d96e352b +P 4e4a650484a39cac43386d8488ff42a8a0cc2820 +R 63e4ec5fcdbe24706473fb0fb3b733b3 U drh -Z bd6e25ca98e62bf29a6a6907bd5ed271 +Z 40fe45935ac29375621feef17be8ca40 diff --git a/manifest.uuid b/manifest.uuid index 0a93274d2c..939aadb8ac 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -4e4a650484a39cac43386d8488ff42a8a0cc2820 \ No newline at end of file +52b3be96b6e96994ec6fbcc67bf355cd05f61730 \ No newline at end of file diff --git a/src/btree.c b/src/btree.c index 9c6193b4f2..d395c8084a 100644 --- a/src/btree.c +++ b/src/btree.c @@ -9,7 +9,7 @@ ** May you share freely, never taking more than you give. ** ************************************************************************* -** $Id: btree.c,v 1.292 2006/01/12 14:30:19 drh Exp $ +** $Id: btree.c,v 1.293 2006/01/12 15:01:16 drh Exp $ ** ** This file implements a external (disk-based) database using BTrees. ** For a detailed discussion of BTrees, refer to @@ -3326,9 +3326,15 @@ int sqlite3BtreeMoveto(BtCursor *pCur, const void *pKey, i64 nKey, int *pRes){ void *pCellKey; i64 nCellKey; pCur->idx = (lwr+upr)/2; - parseCell(pPage, pCur->idx, &pCur->info); - nCellKey = pCur->info.nKey; if( pPage->intKey ){ + u8 *pCell = findCell(pPage, pCur->idx); + pCell += pPage->childPtrSize; + if( pPage->hasData ){ + int dummy; + pCell += getVarint32(pCell, &dummy); + } + getVarint(pCell, &nCellKey); + pCur->info.nSize = 0; if( nCellKeynKey ){ @@ -3338,6 +3344,8 @@ int sqlite3BtreeMoveto(BtCursor *pCur, const void *pKey, i64 nKey, int *pRes){ } }else{ int available; + parseCell(pPage, pCur->idx, &pCur->info); + nCellKey = pCur->info.nKey; pCellKey = (void *)fetchPayload(pCur, &available, 0); if( available>=nCellKey ){ c = pCur->xCompare(pCur->pArg, nCellKey, pCellKey, nKey, pKey);