diff options
author | drh <> | 2023-12-04 01:14:23 +0000 |
---|---|---|
committer | drh <> | 2023-12-04 01:14:23 +0000 |
commit | 2ff73a5f3e6eef0c1cc5423f7d7b41db1f435378 (patch) | |
tree | 0c3e187983f533d28911dc14b0bfffa1f1fcf9a8 /src/json.c | |
parent | b7fd951be4b5ca926c8daa787d5a627c3772df3e (diff) | |
download | sqlite-2ff73a5f3e6eef0c1cc5423f7d7b41db1f435378.tar.gz sqlite-2ff73a5f3e6eef0c1cc5423f7d7b41db1f435378.zip |
Better pre-scan size estimations for objects in the JSON parser resulting
in fewer reallocations and memmove operations.
FossilOrigin-Name: 526b27f90897f5e35dfff7257daf6c4ce4798d649b09b8aecfb02df0449e3c51
Diffstat (limited to 'src/json.c')
-rw-r--r-- | src/json.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/json.c b/src/json.c index f5eef834d..598b29051 100644 --- a/src/json.c +++ b/src/json.c @@ -1268,7 +1268,7 @@ json_parse_restart: case '{': { /* Parse object */ iThis = pParse->nBlob; - jsonBlobAppendNode(pParse, JSONB_OBJECT, (pParse->nJson-i)*2, 0); + jsonBlobAppendNode(pParse, JSONB_OBJECT, pParse->nJson-i, 0); if( ++pParse->iDepth > JSON_MAX_DEPTH ){ pParse->iErr = i; return -1; |