mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-03-02 22:57:32 -05:00
Process libtorrent alerts in a separate thread #468
Labels
No labels
Accessibility
AppImage
Bounty
Build system
CI
Can't reproduce
Code cleanup
Confirmed bug
Confirmed bug
Core
Crash
Data loss
Discussion
Docker
Documentation
Duplicate
Feature
Feature request
Feature request
Feature request
Filters
Flatpak
GUI
Has workaround
I2P
Invalid
Libtorrent
Look and feel
Meta
NSIS
Network
Not an issue
OS: *BSD
OS: Linux
OS: Windows
OS: macOS
PPA
Performance
Project management
Proxy/VPN
Qt bugs
Qt6 compat
RSS
Search engine
Security
Temp folder
Themes
Translations
Triggers
Waiting diagnosis
Waiting info
Waiting upstream
Waiting web implementation
Watched folders
WebAPI
WebUI
autoCloseOldIssue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/qBittorrent#468
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sledgehammer999 on GitHub (Apr 8, 2013).
I think the qbtsession::readalerts() logic should be either
Why is this an issue? Well even with 5 torrents running quite a lot of alerts are posted. Most of those alerts are ignored(ie piece/block request/finish, peer connections open/close, dht/utp stuff). So the while() spins quite a few times. Imagine that some users are reporting 300+ torrents in their sessions. And some of them notice lag in the UI update. With 300+ torrents the while() would have a lot of alerts to go through thus momentarily freezing the UI. Of course having ~10 running torrents isn't an issue.
@cdumez what are your thoughts on this? Should be marked for 3.1.x?
@cdumez commented on GitHub (Apr 8, 2013):
I'm away this week and I don't remember this part of the code very well. I'll try to take a look when I come back. Honestly, I have thought about moving libtorrent do a different process but this is more work :)
@sledgehammer999 commented on GitHub (May 7, 2013):
I did some tests on various things. The bottleneck doesn't seem to be readalerts(). The bottleneck seems to be the repainting of the QTreeView. The custom delegate seems to be fast enough. The problem probably lies in the implementation of the QTreeView itself.
So moving this readalerts() logic in a separate thread shouldn't be a top priority. It would have minimum affect and possibly complicate code unnecessarily.
@sorokin commented on GitHub (Jun 5, 2014):
@sledgehammer999 Probably this issue can be closed now as #1703 is merged.
@sledgehammer999 commented on GitHub (Jun 5, 2014):
Correct. (Did you look into the qatomicpointer problem I mentioned in #1703?)