brave-intl / challenge-bypass-server

https://privacypass.github.io
BSD 3-Clause "New" or "Revised" License
5 stars 6 forks source link

Configure Result Channel to Have a CPU-Bound Buffer Size #704

Closed Sneagan closed 4 months ago

Sneagan commented 4 months ago

Because we are doing CPU-intensive work, it is unlikely that 100 is the most efficient buffer size here. Instead, use runtime.NumCPU() + something to more intelligently set this buffer limit.

https://github.com/brave-intl/challenge-bypass-server/blob/17fec6895e373d00b87317650c70bfda128784a9/kafka/main.go#L92