]> git.ipfire.org Git - people/ms/libloc.git/commit - src/network.c
network: Massively improve performance on exclude
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 25 Nov 2020 15:16:06 +0000 (15:16 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 25 Nov 2020 15:16:06 +0000 (15:16 +0000)
commit058e7800e56150bcf0fb8dceaae6fbab1ed239e4
tree6c147aa0c271c4a19dc8617450d173ce611b88ae
parent4de8ff8e5435225d3375a168054490d2a66b1baf
network: Massively improve performance on exclude

When we check the result for any overlaps, we can cut this short
by walking through both lists from start to end and remember the
last network that we checked.

The next one will by definition be strictly greater and therefore
we do not need to check anything before this any more.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/network.c