moiph / ub3r-b0t

A Discord/IRC Bot
MIT License
94 stars 27 forks source link

Change BlockingCollection to Channel (Bounded). Capacity defined from… #29

Closed eatyouroats closed 2 years ago

eatyouroats commented 2 years ago

By changing BlockingCollection to Channel we can make event processing a lot more efficient. Tested on another bot, but untested in ub3r-b0t. Review changes and edit at will and if need be!

moiph commented 2 years ago

Interesting, need to read up on System.Threading.Channels. Thanks for contributing! I want to add some instrumentation for event time-in-queue first before trying this out. Will update once I can get some measurements from live data.

eatyouroats commented 2 years ago

You're welcome! If anything, could be something for the future! Let me know if there's anything I can assist you with or alike.

moiph commented 2 years ago

Data looks good, think it's pretty obvious where the changes rolled out (replicated these locally to test out on a subset of shards)

image