johman10 / flood-for-transmission

A Flood (https://github.com/Flood-UI/flood) clone for Transmission
GNU General Public License v3.0
339 stars 33 forks source link

Stats refresh requests time is too small? #524

Closed cpainchaud closed 1 year ago

cpainchaud commented 1 year ago

Hi,

Great work you've done here, I love your interface. I noticed one thing though, it seems to request an update from rpc several times per second. I like when things are efficient and avoid unecessary load on machines, do you think you could lower this to once a second or better make it configurable?

thank you!

johman10 commented 1 year ago

I went with one second because of personal preference. I also believe the default Transmission UI uses 1 second as the polling interval.

However, this can of course be made configurable. I can have a look at this at some point. But also feel free to contribute.

cpainchaud commented 1 year ago

thank you for your reply, I see that the UI is hitting 2 or 3 times per seconds ... hmm

johman10 commented 1 year ago

I see that the UI is hitting 2 or 3 times per seconds ... hmm

Do you mean the default Transmission UI? Or Flood for Transmission? There are multiple requests going to the RPC API for different purposes, some are updating the torrent list, others are fetching more details for a specific torrent, some are fetching the statistics.

As long as Transmission doesn't support any kind of open connection (WebSockets or Server Sent Events) there is no real other way (apart from making it configurable).

Please notice that these requests will only be made as long as you have the UI open. As soon as you close the tab, the requests will stop.