Code

src/common.c: Reimplement format_name for performance.
authorFlorian Forster <octo@collectd.org>
Thu, 11 Jul 2013 15:58:37 +0000 (17:58 +0200)
committerFlorian Forster <octo@collectd.org>
Thu, 11 Jul 2013 16:37:34 +0000 (18:37 +0200)
commit69441903172882014e9ac90df2ae6c813dfdfdf5
tree2acfbc303f618b022131f73e03b299b04a8db9a2
parent1e74bb66c61d965c4aa261adfaf058f3356cff09
src/common.c: Reimplement format_name for performance.

This is used from uc_update(), i.e. for every value list dispatched, and was
one of the most expensive functions thanks to snprintf().

This reduces total time spent in the format_name() function from 7.78% to 1.89%
during a network stress test.
src/common.c