]> git.ipfire.org Git - thirdparty/asterisk.git/commit
json.c: improve ast_json_to_ast_variables performance
authorKevin Harwell <kharwell@digium.com>
Wed, 25 Jul 2018 20:33:22 +0000 (15:33 -0500)
committerKevin Harwell <kharwell@digium.com>
Wed, 25 Jul 2018 20:36:56 +0000 (15:36 -0500)
commitf2d19f7250cdb9eea10e014df43ae4f7755048eb
treef4541802f289110564039be8a7aff130e66e5174
parent57369e1618380908a9a562d238f1690cd73f4b2a
json.c: improve ast_json_to_ast_variables performance

When converting from a json object to an ast variables list the conversion
algorithm was doing a complete traversal of the entire variables list for
every item appended from the json structure.

This patch makes it so the list is no longer traversed for each new ast
variable being appended.

Change-Id: I8bf496a1fc449485150d6db36bfc0354934a3977
main/json.c