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)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 2 May 2019 04:05:45 +0000 (00:05 -0400)
commit4d4b475dfb526d016e8162c3079320f4bfe741e7
treeea889761f770b7d275607b93f1edbd74d8fa2927
parent07245ac23157616e3f4ff611341f18193de8e37d
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.024924 seconds and 4 git commands to generate.