mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-09 14:21:03 +03:00
Better pre-scan size estimations for objects in the JSON parser resulting
in fewer reallocations and memmove operations. FossilOrigin-Name: 526b27f90897f5e35dfff7257daf6c4ce4798d649b09b8aecfb02df0449e3c51
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user