[syslog-ng] [PATCH (3.4) 0/2] value-pairs: Efficient sorting

Gergely Nagy algernon at balabit.hu
Fri Feb 10 17:35:20 CET 2012


In the two patches that will follow, a subtle, yet very important
change will be made to the core of value-pairs: instead of building a
GHashTable during a value_pairs_foreach(), we now build a binary tree,
that's sorted at insert time, and traversing through it is much
faster.

This also buys us sorted keys almost free of charge!

And once we have that, the second patch exports a
value_pairs_foreach_sorted() function, so that modules who want to
override the default alphabetical sort will be able to do so.

--
|8]



More information about the syslog-ng mailing list