]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Another (smaller) performance optimization for the JSON parser.
authordrh <drh@noemail.net>
Thu, 24 Sep 2015 01:40:45 +0000 (01:40 +0000)
committerdrh <drh@noemail.net>
Thu, 24 Sep 2015 01:40:45 +0000 (01:40 +0000)
FossilOrigin-Name: c43daa8c78df99f62dd4d3c83708a3a8eff92496

ext/misc/json1.c
manifest
manifest.uuid

index cf766120cdb958e5bea1a1a3180c32ffd11a5eac..89b70f0838042e1c23e60f8b9458be64d94f8030 100644 (file)
@@ -649,8 +649,7 @@ static int jsonParseValue(JsonParse *pParse, u32 i){
   int x;
   JsonNode *pNode;
   while( safe_isspace(pParse->zJson[i]) ){ i++; }
-  if( (c = pParse->zJson[i])==0 ) return 0;
-  if( c=='{' ){
+  if( (c = pParse->zJson[i])=='{' ){
     /* Parse object */
     iThis = jsonParseAddNode(pParse, JSON_OBJECT, 0, 0);
     if( iThis<0 ) return -1;
@@ -770,6 +769,8 @@ static int jsonParseValue(JsonParse *pParse, u32 i){
     return -2;  /* End of {...} */
   }else if( c==']' ){
     return -3;  /* End of [...] */
+  }else if( c==0 ){
+    return 0;   /* End of file */
   }else{
     return -1;  /* Syntax error */
   }
index 28c26272cb75b1b004525aa35549d174ce7fa1db..2c5938e49521f2701ad7cf44e5bf23d6fb1e152a 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Performance\soptimizations\son\sthe\sJSON\sparser.
-D 2015-09-24T01:06:37.957
+C Another\s(smaller)\sperformance\soptimization\sfor\sthe\sJSON\sparser.
+D 2015-09-24T01:40:45.848
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in e1afa6fb2de2bddd50e0ddae8166c2ee9d69b301
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -195,7 +195,7 @@ F ext/misc/eval.c f971962e92ebb8b0a4e6b62949463ee454d88fa2
 F ext/misc/fileio.c d4171c815d6543a9edef8308aab2951413cd8d0f
 F ext/misc/fuzzer.c 4c84635c71c26cfa7c2e5848cf49fe2d2cfcd767
 F ext/misc/ieee754.c b0362167289170627659e84173f5d2e8fee8566e
-F ext/misc/json1.c 7d0000e380785587d463087aa9b35969727bd441
+F ext/misc/json1.c 557d6b2d0c3d26625e686a4b4ef8d4a50b8cec94
 F ext/misc/nextchar.c 35c8b8baacb96d92abbb34a83a997b797075b342
 F ext/misc/percentile.c bcbee3c061b884eccb80e21651daaae8e1e43c63
 F ext/misc/regexp.c af92cdaa5058fcec1451e49becc7ba44dba023dc
@@ -1388,7 +1388,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 5b61b72f5424a2d9bb4e68eb95026cd63f003db9
-R 573d7fd2b2ba49c88643e63838f29bfa
+P 7dd4b07a42eb84589d34430b9d7bfa88fbd743eb
+R 35931ccc4bad18cd2e2cb0703934d351
 U drh
-Z e6052053910d25a8548d981b3aa4b989
+Z 66f4794fa30512464c1e57a2a59bf55d
index 799899d2bdcfe2889237e334c972f7aa7069dfe0..c10e1de96fbc17628e1b5255199995a698f6ba14 100644 (file)
@@ -1 +1 @@
-7dd4b07a42eb84589d34430b9d7bfa88fbd743eb
\ No newline at end of file
+c43daa8c78df99f62dd4d3c83708a3a8eff92496
\ No newline at end of file