From 70a8399e0dab0d9ee4c11959721e48e87ef261c0 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Sat, 29 Aug 2015 23:21:20 +0900 Subject: table: disable merging NLRIs if we don't have many NLRIs Signed-off-by: FUJITA Tomonori --- table/message.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'table/message.go') diff --git a/table/message.go b/table/message.go index c5dfb4d4..0066fc36 100644 --- a/table/message.go +++ b/table/message.go @@ -193,9 +193,14 @@ func CreateUpdateMsgFromPaths(pathList []*Path) []*bgp.BGPMessage { var msgs []*bgp.BGPMessage pathByAttrs := make(map[uint32][]*bucket) - + pathLen := len(pathList) for _, path := range pathList { y := func(p *Path) bool { + // the merging logic makes gobgpd slower so if + // paths are not many, let's avoid mering. + if pathLen < 1024 { + return false + } if p.GetRouteFamily() != bgp.RF_IPv4_UC { return false } -- cgit v1.2.3