]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Minor optimization for fts5 queries.
authordan <dan@noemail.net>
Wed, 21 Oct 2015 20:07:08 +0000 (20:07 +0000)
committerdan <dan@noemail.net>
Wed, 21 Oct 2015 20:07:08 +0000 (20:07 +0000)
FossilOrigin-Name: 363b36d50b6f3e3d3e79c538be1167b071a5a710

ext/fts5/fts5_index.c
manifest
manifest.uuid

index 1628018b48db550cd43af313ea5a5023b0059019..9e3a9e0ff7f27f8b3e41f5fa7ce17f9129fcb6d2 100644 (file)
@@ -1828,7 +1828,14 @@ static void fts5SegIterNext(
             if( pbNewTerm ) *pbNewTerm = 1;
           }
         }else{
-          fts5SegIterLoadNPos(p, pIter);
+          /* The following could be done by calling fts5SegIterLoadNPos(). But
+          ** this block is particularly performance critical, so equivalent
+          ** code is inlined. */
+          int nSz;
+          assert( p->rc==SQLITE_OK );
+          fts5FastGetVarint32(pIter->pLeaf->p, pIter->iLeafOffset, nSz);
+          pIter->bDel = (nSz & 0x0001);
+          pIter->nPos = nSz>>1;
         }
       }
     }
index 05c2a89ea410335b4025d7666d7bbad843d89217..a9a1d123ff230bec3c7ad42a283bdfb0c3410ab4 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\sextra\sdebugging\sfunction\sto\stest_rbu.c.\sEnhance\sthe\sdocumentation\sfor\ssqlite3rbu_db()\sto\sdefine\sthe\svalidity\sof\sthe\sreturned\sdatabase\shandles.
-D 2015-10-21T08:26:01.477
+C Minor\soptimization\sfor\sfts5\squeries.
+D 2015-10-21T20:07:08.658
 F Makefile.in 2ea961bc09e441874eb3d1bf7398e04feb24f3ee
 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
 F Makefile.msc 4eb750e0fdf52050a06d881e1b060f4bb116ed7e
@@ -109,7 +109,7 @@ F ext/fts5/fts5_buffer.c 6d4082daa71eef87812b8caa9d60ae57a6a9ebc0
 F ext/fts5/fts5_config.c 88a77f5d5e4dfbb2355b8f6cc9969b7f02d94685
 F ext/fts5/fts5_expr.c 28b15c9ae296204bc0a2e5cf7a667d840a9d2900
 F ext/fts5/fts5_hash.c a9d4c1efebc2a91d26ad7ebdfcbf2678ceac405f
-F ext/fts5/fts5_index.c d3503c75d329f027140b855149566c97c078c18d
+F ext/fts5/fts5_index.c 47ef0002b49b1dba5d5a49c8f2b02160a146a4ff
 F ext/fts5/fts5_main.c 520a29136ba07448331f73bdc36d0ffa1e9dcfef
 F ext/fts5/fts5_storage.c 8038a54a88d3beb94dc7f9db6428a3bc08b718bb
 F ext/fts5/fts5_tcl.c 3bf445e66de32137d4693694ff7b1fd6074e32bd
@@ -1391,7 +1391,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 0a903ec26bfbbe9bfd18bc34934e689ffdb01ce5
-R c0f5065bff60d0df79ae9d2bf6514716
+P b9c4aa521156d8ca09151a82a7e80aa8d1d7a313
+R 4d88206e8c01136d0ea377b3eae363fe
 U dan
-Z 2c0acb856eea548f945a4e7fa327a156
+Z 08a5e9e12273e463d7b7c3c870bc7777
index c6965600bc9446c51f79caed7721645776b7a6f5..cac1a13281d5440158be416212e03abcba003308 100644 (file)
@@ -1 +1 @@
-b9c4aa521156d8ca09151a82a7e80aa8d1d7a313
\ No newline at end of file
+363b36d50b6f3e3d3e79c538be1167b071a5a710
\ No newline at end of file