]> git.ipfire.org Git - thirdparty/bird.git/commit
Nest: Avoid unnecessary net_format() in 'show route' command
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Thu, 2 Dec 2021 03:05:17 +0000 (04:05 +0100)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Sun, 6 Feb 2022 22:27:13 +0000 (23:27 +0100)
commit61375bd0b3803fada0d7bb5b81b5824bab16b7c1
treed190d9bd0a22dc2381db8e672d01c922af561937
parent9ac16df3d7239bc82d8016591755b41b14285608
Nest: Avoid unnecessary net_format() in 'show route' command

When output of 'show route' command was generated, the net_format() was
called for each network prematurely, even if the result was not needed.

Fix the code to call net_format() only when needed. This makes queries
that process many networks but show only few (e.g. 'show route where ..',
or 'show route count') much faster (like 5x - 10x faster).
nest/rt-show.c