Power2All / torrust-actix

A multi-functional lightweight BitTorrent Tracker
MIT License
86 stars 5 forks source link

[v3.2.0] Replace RwLock with Crossbeam Channel, for performance reasons #24

Closed Power2All closed 1 year ago

Power2All commented 1 year ago

I have noticed performance problems with RwLock in the longer run. After debating, I'm going to switch to Crossbeam Channel, as this does block (aka, "lock") the variable through a bounded channel, so that each variable being maintained by a rwlock, have their own channel without interfering with each other. This is a huge rewrite of the implementation, and will take some work and testing.

Power2All commented 1 year ago

Changed my mind after going through my code. Did some heavy optimizations, closing down this issue, as it's been addressed in a optimization refactor. See: 307423d75b605982f5b339df305537a51f76e75e