collectd/collectd — pull request #139 by ymettier (2012-09-28 09:57:01+00:00)
Title: Performance improvment on uc_get_names

Hello,

uc_get_names() now allocates (realloc) memory by blocks and not element by element.
Performance improvment : measures with times(), with ~800000 names :
with size_increment=1 (same as without this patch) : between 100 and 120 ticks
with size_increment=1024 : 64 or 65 ticks
with size_increment=102400 : between 52 and 57 ticks.

uc_get_names() is currently used only in listval (unixsocks) but I use it with my new jsonrpc server.

Regards,
Yves