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:28 +0000 (15:37 -0500)
commit783bff0637d3bd3a38093b790c46e6336d85cf15
tree23d2cdb73753dea78501d5ca04a980a5c654e907
parent1c8e6ecca3c39c426c89356c9dfc45fd3ea5cfac
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