diff options
author | Nikias Bassen | 2018-12-23 02:38:20 +0100 |
---|---|---|
committer | Nikias Bassen | 2018-12-23 02:38:20 +0100 |
commit | 3f967317479acc4b98594b4b86a2787cbd2aa1f1 (patch) | |
tree | b2510557f854f522c117d2e067f414d01a0cc3c1 /.github/workflows/build.yml | |
parent | 92e5c858c246f3a01104f511c23217fd75c272f4 (diff) | |
download | libplist-3f967317479acc4b98594b4b86a2787cbd2aa1f1.tar.gz libplist-3f967317479acc4b98594b4b86a2787cbd2aa1f1.tar.bz2 |
plist: Improve plist_dict_next_item() drastically by iterating on node list directly
As Xiao Deng pointed out in #131, plist_dict_next_item() was very inefficient.
For each iteration, node_nth_child() was called with the iterator value, which
would walk through the child node list on EVERY iteration. If the dictionary
is large this makes things very slow. More than that, after reaching the key
node the code was calling node_nth_child() AGAIN (with iterator value + 1) to
reach the value node, which would walk through the node list once more.
This commit changes the iterator to be a node_t pointer so that the iteration
is done on the node list directly.
Diffstat (limited to '.github/workflows/build.yml')
0 files changed, 0 insertions, 0 deletions