Use "growing" `GArray` to store string field's payload
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 7 Jun 2018 00:45:08 +0000 (20:45 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 3 May 2019 22:19:34 +0000 (18:19 -0400)
commite42dd7635b97096f123104cfd8a26fe5d095b46c
tree40ae299a0703094a6f9c420ae304e65e7f39351f
parent94a96686f6ecb39b08e1afd636995f7e1c5ed13c
Use "growing" `GArray` to store string field's payload

Minimize the number of required operations for functions such as
bt_field_string_set_value(), bt_field_string_append(),
bt_field_string_append_len(), and bt_field_string_clear().

This patch makes the string field object use the same principle that the
sequence field uses, but with a `GArray` of characters instead of a
`GPtrArray` of fields.

Preliminary benchmarks show that this approach is faster than using a
`GString` object.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
include/babeltrace/ctf-ir/fields-internal.h
lib/ctf-ir/fields.c
lib/ctf-writer/fields.c
lib/lib-logging.c
This page took 0.026014 seconds and 4 git commands to generate.