From a0529a7f9f097f6712f672280c6ce74548ccc819 Mon Sep 17 00:00:00 2001
From: Ian Luo <ian.luo@gmail.com>
Date: Fri, 14 Aug 2020 09:03:51 +0800
Subject: [PATCH] make map with init size

---
 cluster/router/chain/invoker_cache.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cluster/router/chain/invoker_cache.go b/cluster/router/chain/invoker_cache.go
index 9f96bddd4..43cdfa506 100644
--- a/cluster/router/chain/invoker_cache.go
+++ b/cluster/router/chain/invoker_cache.go
@@ -49,8 +49,8 @@ func BuildCache(invokers []protocol.Invoker) *InvokerCache {
 	return &InvokerCache{
 		invokers:  invokers,
 		bitmap:    utils.ToBitmap(invokers),
-		pools:     make(map[string]router.AddrPool),
-		metadatas: make(map[string]router.AddrMetadata),
+		pools:     make(map[string]router.AddrPool, 8),
+		metadatas: make(map[string]router.AddrMetadata, 8),
 	}
 }
 
-- 
GitLab