diff options
author | Phil Sutter <phil@nwl.cc> | 2020-05-13 16:29:51 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2020-05-14 12:27:24 +0200 |
commit | c96c7da272e33a34770c4de4e3e50f7ed264672e (patch) | |
tree | c62aed869fa881e875ee58fd034bed6a57c6c5a4 /doc | |
parent | f3a61c8760d40cd2ac5822f5d724a97041cfdd63 (diff) |
JSON: Improve performance of json_events_cb()
The function tries to insert handles into JSON input for echo option.
Yet there may be nothing to do if the given netlink message doesn't
contain a handle, e.g. if it is an 'add element' command. Calling
seqnum_to_json() is pointless overhead in that case, and if input is
large this overhead is significant. Better wait with that call until
after checking if the message is relevant at all.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Eric Garver <eric@garver.life>
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions