This patch series optimizes monitor and monitor-cond commands by optimizing server-side json serialization. This is achieved by removing intermediate representation. Most importantly, this greatly reduces allocations and deallocations done in process. This also does reduce peak memory consumption, but it wasn't a bottleneck and thus wasn't precisely measured. See patch 3/3 description for more details.
This can be further improved by building complete response in ds. Also benificial will be to reduce calls to stdio.h library. Proper profiling is required to identify even further improvements. The patches 1/3 and 2/3 contain (almost) independent improvements, that were all-too-easy to be done during the optimization process. Patch 3/3 is the main part. Original patch 1/4 was removed due to it not being relevant to the purpose of series. v1->v2: fixed commit message titles v2->v3: fixed incorrect bracing in touched code in PATCH 4/4 v3->v4: removed patch 1/4 fixed incorrectly sent v3 series added cover letter v4->v5: fixed yet again incorrectly sent v4 series Grigorii Nazarov (3): ovsdb: Simplify UUID formatting code. lib/json: Simplify string serialization code. ovsdb: Optimize monitor update by directly serializing data into ds. include/openvswitch/json.h | 1 + lib/json.c | 19 ++-- lib/ovsdb-data.c | 113 ++++++++++++++++++-- lib/ovsdb-data.h | 3 + lib/uuid.h | 1 + ovsdb/monitor.c | 210 ++++++++++++++++++++++++------------- 6 files changed, 260 insertions(+), 87 deletions(-) -- 2.45.2 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev