mirror of https://github.com/mastodon/flodgatt
d23cc40bea
* Remove use of last_polled_time [WIP] This commit stops removing subscriptions based on their last polled time to test the impact of this change on CPU use. This is a WIP because it does not yet remove subscriptions in any other way, which (if deployed in production) would cause a memory leak – memory use would grow with each new subscription and would never be reduced as clients end their subscriptions. * Fix bug with RedisConnection polling freqeuency * Improve performance of EventStream This commit changes the EventStream so no longer polls client WebSocket connections to see if it should clean up the connection. Instead, it cleans up the connection whenever it attempts to send a ping or a message through the connection and receives an error indicating that the client has disconnected. As a result, client connections aren't cleaned up quite as quickly, but overall sys CPU time should be dramatically improved. * Remove empty entries from MsgQueues hashmap Before this change, entries in the MsgQueue hashmap would remain once added, even if their value fell to 0. This could lead to a very slight memory leak/increase, because the hashmap would grow each time a new user connected and would not decrease again. This is now fixed. * Bump version and remove unused benchmark |
||
---|---|---|
.. | ||
config | ||
err | ||
messages | ||
parse_client_request | ||
redis_to_client_stream | ||
lib.rs | ||
main.rs | ||
rustfmt.toml |