torrust / torrust-tracker

A modern and feature-rich (private) BitTorrent tracker.
https://torrust.com
GNU Affero General Public License v3.0
357 stars 40 forks source link

Refactor active requests buffer #922

Closed josecelano closed 3 months ago

josecelano commented 3 months ago

This refactoring tries to simplify the UDP active requests buffer by decoupling, making a place for a new request when the buffer is full and cleaning all finished tasks.

The idea is just to:

It was discarded because of the regression in performance.

I guess the problem is that, on average, we cannot guarantee that the eldest task will be the first to finish, so we have to remove more unfished tasks when there are finished tasks in the buffer.