From 3a5c2e235ca18d21b36e1e165197dcf714e8f9c5 Mon Sep 17 00:00:00 2001 From: Annika Hannig Date: Wed, 16 Nov 2022 11:23:07 +0100 Subject: [PATCH] updated performance evaluation --- pkg/sources/birdwatcher/parsers.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pkg/sources/birdwatcher/parsers.go b/pkg/sources/birdwatcher/parsers.go index ab2386e..b9d6b12 100644 --- a/pkg/sources/birdwatcher/parsers.go +++ b/pkg/sources/birdwatcher/parsers.go @@ -247,13 +247,9 @@ func parseRouteBgpInfo(data interface{}) *api.BGPInfo { localPref, _ := strconv.Atoi(decoders.String(bgpData["local_pref"], "0")) med, _ := strconv.Atoi(decoders.String(bgpData["med"], "0")) - // Testing and benchmarks show: Deduplicating communities has - // quite a performance impact: - // Without using pools, parsing 600000 routes - // takes roughly 16 seconds, with pools for strings - // and AS paths: 18 seconds. - // With communities: 46 seconds. This is quite long. - + // Using pools has a bit of a performance impact. While parsing + // ~600000 routes without deduplication, this takes roughly 14 seconds. + // With pools this is now 19 seconds. bgp := &api.BGPInfo{ Origin: pools.Origins.Acquire( decoders.String(bgpData["origin"], "unknown")),