mirror of https://github.com/grafana/loki
chore(blooms): Reduce memory footprint of download queue (#18242)
The download queue has a fixed size of 100k elements and is implemented using a channel. Since the channel has a fixed size, this will allocate `capacity * object size`, where the object is `downloadRequest[BlockRef, BlockDirectory]`. This PR changes the channel from a channel of objects (`chan downloadRequest[T, R]`) to a channel of pointers (`chan *downloadRequest[T, R]`) which should significantly reduce the permanently allocated memory for the queue. Signed-off-by: Christian Haudum <christian.haudum@gmail.com>pull/12054/head^2
parent
ab41c00b40
commit
66c483981b
Loading…
Reference in new issue