]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix a performance regression introduced while reworking the fts3 code.
authordan <dan@noemail.net>
Thu, 19 Nov 2009 18:28:45 +0000 (18:28 +0000)
committerdan <dan@noemail.net>
Thu, 19 Nov 2009 18:28:45 +0000 (18:28 +0000)
FossilOrigin-Name: 7cd178a72ab99c94fdacffb19aad819ae600e57d

ext/fts3/fts3.c
manifest
manifest.uuid

index effe0ba5c96cf490c2b27576b6a36c8f1ef7a656..016735350538bbdf31b003561e53a442842b0fac 100644 (file)
@@ -926,6 +926,7 @@ static int fts3SelectLeaf(
   int nAlloc = 0;                 /* Size of allocated buffer */
 
   while( 1 ){
+    int isFirstTerm = 1;          /* True when processing first term on page */
     int iHeight;                  /* Height of this node in tree */
     sqlite3_int64 iChild;         /* Block id of child node to descend to */
     int nBlock;                   /* Size of child node in bytes */
@@ -940,9 +941,10 @@ static int fts3SelectLeaf(
       int nBuffer;                /* Total term size */
   
       /* Load the next term on the node into zBuffer */
-      if( zBuffer ){
+      if( !isFirstTerm ){
         zCsr += sqlite3Fts3GetVarint32(zCsr, &nPrefix);
       }
+      isFirstTerm = 0;
       zCsr += sqlite3Fts3GetVarint32(zCsr, &nSuffix);
       if( nPrefix+nSuffix>nAlloc ){
         char *zNew;
index 869616e2f844cfec36f1785e32fe1f0cd9a8e7cf..ea87877793a613e6d06fd730d8b4f78ef129b3e8 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Merge\sfts3-refactor\sinto\sthe\smain\strunk.
-D 2009-11-19T15:26:54
+C Fix\sa\sperformance\sregression\sintroduced\swhile\sreworking\sthe\sfts3\scode.
+D 2009-11-19T18:28:45
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in 7f6c6aa7feeeb5e26e01b344161d9aa1b5d64177
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -56,7 +56,7 @@ F ext/fts2/mkfts2amal.tcl 974d5d438cb3f7c4a652639262f82418c1e4cff0
 F ext/fts3/README.syntax a19711dc5458c20734b8e485e75fb1981ec2427a
 F ext/fts3/README.tokenizers 998756696647400de63d5ba60e9655036cb966e9
 F ext/fts3/README.txt 8c18f41574404623b76917b9da66fcb0ab38328d
-F ext/fts3/fts3.c 3251d3c5e2304bcd2d8d92d1fa8fa204cfdcd28d
+F ext/fts3/fts3.c e7383c74407e54e198317a92a0229162d2b0b9a7
 F ext/fts3/fts3.h 3a10a0af180d502cecc50df77b1b22df142817fe
 F ext/fts3/fts3Int.h f7488bbc9fd12bd3843f59265227321a92b39ed4
 F ext/fts3/fts3_expr.c bdf11f3602f62f36f0e42823680bf22033dae0de
@@ -772,7 +772,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P 4bd43307090258f8652c995b056101c51b81274a 3b17924754343c0163464dabf01a9c46ffccef28
-R 627d84d1c58a3ccfd8d073223703a50a
+P 551dbe30eab5855756e6356f6ba050f5d1791ef8
+R f7b891b4bcfc7c759749c61f9eb643c5
 U dan
-Z 3f2064eaa4e1d7bebb28fcd8b8486169
+Z 8e0de62e656b56f2e53230487feca6ce
index 0dbd8e5c5498d06a88152a9b21c13fa6b6f7b2e2..91ca6d099ee18e2e775df2d3741fbdecf1af6914 100644 (file)
@@ -1 +1 @@
-551dbe30eab5855756e6356f6ba050f5d1791ef8
\ No newline at end of file
+7cd178a72ab99c94fdacffb19aad819ae600e57d
\ No newline at end of file