]> 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:37:08 +0000 (15:37 -0500)
commit8ea13d62cd07f7784202ca717feda0659b3fb0a0
tree30df58841bc3073c86ac5833138c4bb135ae9fce
parent4a51f2792e07f1f83889b4f4ef0fa5352855c9d6
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