diff options
-rw-r--r-- | table/message.go | 7 |
1 files changed, 6 insertions, 1 deletions
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 } |