]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Small performance improvement on sqlite3BtreeMoveto. (CVS 2934)
authordrh <drh@noemail.net>
Fri, 13 Jan 2006 02:35:09 +0000 (02:35 +0000)
committerdrh <drh@noemail.net>
Fri, 13 Jan 2006 02:35:09 +0000 (02:35 +0000)
FossilOrigin-Name: c780152f3cff9c0a13d231935ae3c2e2d28b4460

manifest
manifest.uuid
src/btree.c

index 54471053789bf84503944c187d18a7b1788f8e62..2ac0be5abe477f0a2f5c5f46164311825778c88b 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\sa\shigh-speed\sversion\sof\ssqlite3GetVarint32\sto\svdbe.c\sfor\sa\s3%\sperformance\ngain.\s(CVS\s2933)
-D 2006-01-13T01:48:59
+C Small\sperformance\simprovement\son\ssqlite3BtreeMoveto.\s(CVS\s2934)
+D 2006-01-13T02:35:10
 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 fdbb411805bf0c0087784a4daf95b4de1b469978
+F src/btree.c 51b54ae0182d6b2cf129bc98064f5a2c4ed30ab9
 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 ace8ba817766f9da270cd7f06b68cc537768a8be
-R 4f16d865eb1a68e0be85977f1ba457c6
+P a64e8251a606fb2c298d7d804f3964a9155c73c5
+R 88c254e780b2ea9454333fd58253e3cf
 U drh
-Z a443a150c79d39fb2ce3f4a546cc3706
+Z cf8b778aba2aa976f9c38e986b5a01cc
index b71a0213e7f92ea0792559f8f9111a83e9835f5e..ac82ed014ac4caead6764c99626cff4935f74b61 100644 (file)
@@ -1 +1 @@
-a64e8251a606fb2c298d7d804f3964a9155c73c5
\ No newline at end of file
+c780152f3cff9c0a13d231935ae3c2e2d28b4460
\ No newline at end of file
index d395c8084a3bf59babb481c65fbaa883a040d71c..dada61a0f829d624777aeb36e9885908c5d8a1df 100644 (file)
@@ -9,7 +9,7 @@
 **    May you share freely, never taking more than you give.
 **
 *************************************************************************
-** $Id: btree.c,v 1.293 2006/01/12 15:01:16 drh Exp $
+** $Id: btree.c,v 1.294 2006/01/13 02:35:10 drh Exp $
 **
 ** This file implements a external (disk-based) database using BTrees.
 ** For a detailed discussion of BTrees, refer to
@@ -2901,8 +2901,7 @@ static int getPayload(
   pageIntegrity(pPage);
   assert( pCur->idx>=0 && pCur->idx<pPage->nCell );
   getCellInfo(pCur);
-  aPayload = pCur->info.pCell;
-  aPayload += pCur->info.nHeader;
+  aPayload = pCur->info.pCell + pCur->info.nHeader;
   if( pPage->intKey ){
     nKey = 0;
   }else{
@@ -3326,6 +3325,7 @@ int sqlite3BtreeMoveto(BtCursor *pCur, const void *pKey, i64 nKey, int *pRes){
       void *pCellKey;
       i64 nCellKey;
       pCur->idx = (lwr+upr)/2;
+      pCur->info.nSize = 0;
       if( pPage->intKey ){
         u8 *pCell = findCell(pPage, pCur->idx);
         pCell += pPage->childPtrSize;
@@ -3334,7 +3334,6 @@ int sqlite3BtreeMoveto(BtCursor *pCur, const void *pKey, i64 nKey, int *pRes){
           pCell += getVarint32(pCell, &dummy);
         }
         getVarint(pCell, &nCellKey);
-        pCur->info.nSize = 0;
         if( nCellKey<nKey ){
           c = -1;
         }else if( nCellKey>nKey ){
@@ -3344,9 +3343,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);
+        nCellKey = pCur->info.nKey;
         if( available>=nCellKey ){
           c = pCur->xCompare(pCur->pArg, nCellKey, pCellKey, nKey, pKey);
         }else{