preallocated slices (#934)
This commit is contained in:
		
							
								
								
									
										2
									
								
								grpc.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								grpc.go
									
									
									
									
									
								
							| @@ -582,7 +582,7 @@ func (g *grpcServer) Register() error { | ||||
| 		return subscriberList[i].topic > subscriberList[j].topic | ||||
| 	}) | ||||
|  | ||||
| 	var endpoints []*registry.Endpoint | ||||
| 	endpoints := make([]*registry.Endpoint, 0, len(handlerList)+len(subscriberList)) | ||||
| 	for _, n := range handlerList { | ||||
| 		endpoints = append(endpoints, g.handlers[n].Endpoints()...) | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user