go-graphite / go-carbon

Golang implementation of Graphite/Carbon server with classic architecture: Agent -> Cache -> Persister
MIT License
801 stars 126 forks source link

Decrease gRPC streaming channel size #524

Closed emadolsky closed 1 year ago

emadolsky commented 1 year ago

Go allocates the memory for the capacity given while initializing the channels. Therefore, having a big channel can cost a lot. This commit decreases the channel size. However, it is probably better to determine the size dynamically, and by the result of glob expansion. So this commit also adds one more field to tle to help find a logic for setting the size of the channel.