]> git.ipfire.org Git - thirdparty/bird.git/commit
Trie optimizer mq-trie-opt
authorJan Maria Matejka <mq@ucw.cz>
Wed, 12 Sep 2018 13:31:13 +0000 (15:31 +0200)
committerJan Maria Matejka <mq@ucw.cz>
Wed, 12 Sep 2018 13:32:21 +0000 (15:32 +0200)
commitdae0ea9b0e475d49849875c738cf00b939b698e1
tree58ee90342ecaf941179b231f708bb549666580c5
parentabec20083a351ba2033bae773c23bb34a898f4c0
Trie optimizer

This patch optimizes prefix sets like
  [ 10.0.0.0/24, 10.0.1.0/24, 10.0.2.0/24, 10.0.3.0/24 ]
into
  [ 10.0.0.0/22{24,24} ]

This should improve config loading speed with large config files.

Works only in config-check mode; the appropriate flag is -O.
Beware. The output is written directly on stdout.

This patch is not intended to be ever merged with mainline in this form.
Instead, we should fix bad lexer performance and also merge the
merge-able prefixes on-the-fly during trie creation. Ultimately,
we should have better possibility to feed database-like structures into
BIRD instead of config file.
filter/config.Y
filter/filter.h
filter/trie.c
sysdep/unix/main.c
sysdep/unix/unix.h