]> granicus.if.org Git - json-c/commit
Add json_object_array_shrink() (and array_list_shrink()) and use it in json_tokener...
authorEric Haszlakiewicz <erh+git@nimenees.com>
Sat, 20 Jun 2020 18:03:04 +0000 (18:03 +0000)
committerEric Haszlakiewicz <erh+git@nimenees.com>
Sat, 20 Jun 2020 18:03:04 +0000 (18:03 +0000)
commite26a1195f44a16348819dee2461ad6c1eb92a69b
tree173422db0d138d19350764432931fe1fe08d1b4d
parent99bb2121c63f57792817fe9298d1b1c66eff3496
Add json_object_array_shrink() (and array_list_shrink()) and use it in json_tokener to minimize the amount of memory used.  This results in a 39%-50% reduction in memory use (peak RSS, peak heap usage) on the jc-bench benchmark and 9% shorter runtime.
Also add the json_object_new_array_ext, array_list_new2, and array_list_shrink functions.
ChangeLog
arraylist.c
arraylist.h
json_object.c
json_object.h
json_tokener.c