Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

laggy and slow responding UI #11822

Closed
wifon opened this issue Jan 4, 2020 · 29 comments
Closed

laggy and slow responding UI #11822

wifon opened this issue Jan 4, 2020 · 29 comments
Labels
GUI GUI-related issues/changes Performance

Comments

@wifon
Copy link

wifon commented Jan 4, 2020

Please provide the following information

qBittorrent version and Operating System

Linux Mint 19.3

anon@Warsaw:~$ apt version qbittorrent 
1:4.2.0.99~201912180418-6819-118af03~ubuntu18.04.1

If on linux, libtorrent-rasterbar and Qt version

apt version libtorrent-rasterbar outputs just a blank line
Qt version

anon@Warsaw:~$ apt version libqtcore4 
4:4.8.7+dfsg-7ubuntu1
anon@Warsaw:~$ apt version libqt5core5a 
5.9.5+dfsg-0ubuntu2.4

What is the problem

since few updates, UI is responding really slow and laggy

What is the expected behavior

I expected UI to run smoothly

note that I dont have this problem with other Qt apps, Virtualbox for example

@HiFiPhile
Copy link
Contributor

Same here on Debian 10.2.
Self-built qBittorrent 4.2.1, libtorrent-rasterbar 1.2.2.

@HiFiPhile
Copy link
Contributor

Revert to 4.1.9 resolved the issue.

@nhouck
Copy link

nhouck commented Jan 7, 2020

Similar issue on Windows, UI may be all white or black if visible, or won't restore from being hidden, but the task bar icon seems to still show activity with upload/download speed changing periodically. This happens after running for some time such as overnight. When I come back the UI won't restore. Sometimes I can close the app using the taskbar icon, other times it won't work and I have to force kill it. Seems this started with 4.20 update is my best guess. I might try reverting and see if that helps.

@nhouck
Copy link

nhouck commented Jan 7, 2020

Was just noticing that it only took about 5-10 minutes for the UI to freeze up and go white.
I downgraded to 4.1.9 and so far no issue after 1 hour.

@wifon
Copy link
Author

wifon commented Jan 8, 2020

No problem with restoration or freezing on Linux.

@DaarkWel
Copy link

DaarkWel commented Jan 9, 2020

Same problem on Arch. Very laggy UI respond. I downgraded to qbittorrent 4.1.9 and libtorrent-rasterbar 1.1.13.

@pressRtowin

This comment has been minimized.

@51cent
Copy link

51cent commented Jan 19, 2020

Same problem on Ubuntu 18.04. I have built qBittorrent from source.

Scrolling is in general very sluggish and a refresh of the torrent list leads to about 30% CPU usage spikes on one core when the GUI is shown. The CPU usage is fine, when it resides in the tray.

@thalieht thalieht added the GUI GUI-related issues/changes label Jan 19, 2020
@Ownsin
Copy link

Ownsin commented Feb 9, 2020

I have the same issue on Windows 10. Sometimes when I click on the QB icon in the tray area. It would open it but it would be frozen with a white page. It won't work until I restart the entire program. I hope this gets fixed because it's really annoying!

@orbatos
Copy link

orbatos commented Mar 13, 2020

I have noticed under (multiple OS) that RSS feed checking prevents UI updates, this should probably not be the case.

Additional notes:
When this happens under Linux I often have to kill QB again after forcing the GUI to close, before re-opening it.

@awsms
Copy link

awsms commented Mar 30, 2020

Same config & issue than OP, and it's now even worse with 4.2.2

@MooseMalloy
Copy link

Same here on Linux Mint 19.3 and v.4.2.3 of qbitorrent.

@empirenarrative
Copy link

empirenarrative commented Apr 27, 2020

Ubuntu Mate 18.04.4, 16GB ram, SSD, I7-2600K
qBittorrent 4.2.6
libtorrent 1.2.6.0

UI lags when doing anything except opening and closing program. We're talking a 2-3 second lag from click to selecting torrent or opening a menu or scrolling the torrent list. Started sometime after updating to v4....at least six months ago. I usually update the qB version within two weeks of release so whatever version came out in the last 6-8 months is when it started.
Tried changing qB cache from -1 to 128MB. No change.
Mouse moves as expected, only UI is laggy.

@FranciscoPombal FranciscoPombal added the Can't reproduce Issues that cannot be reproduced label Apr 27, 2020
@MooseMalloy
Copy link

Ubuntu Mate 18.04.4, 16GB ram, SSD, I7-2600K
qBittorrent 4.2.6
libtorrent 1.2.6.0

UI lags when doing anything except opening and closing program. We're talking a 2-3 second lag from click to selecting torrent or opening a menu or scrolling the torrent list. Started sometime after updating to v4....at least six months ago. I usually update the qB version within two weeks of release so whatever version came out in the last 6-8 months is when it started.
Tried changing qB cache from -1 to 128MB. No change.
Mouse moves as expected, only UI is laggy.

Yes similar story here. My lag is about a second on clicking anything, scrolling the torrent list etc.

I don't know if it is coincidence, but the UI update seems to me to occur roughly whenever the transfer-rate graphs updates. I wondered if the graph rendering routine was locking the UI until it was ready to render the next update.

Linux Mint 19.3 and qBitorrent 4.2.5

@UthmanSkeppes
Copy link

UthmanSkeppes commented Apr 28, 2020

I experienced the same issue with release V4.2.3 on Linux Mint 19.3 Cinnamon. (8GB RAM, 10th gen Intel I5, SSD 970 EVO)

The UI seemed fine with a couple of torrents loaded, but got slower the more torrent I added. At around 100 torrents loaded, the UI became very laggy, mouse clicks or keyboard taking something around a second to respond.

The problem was fixed by reverting to an older version, V4.0.3.

@FranciscoPombal
Copy link
Member

FranciscoPombal commented Apr 28, 2020

Can someone please post a callgrind profile of the execution, if they know how to do so?

@empirenarrative
Copy link

empirenarrative commented Apr 28, 2020

The problem was fixed by reverting to an older version, V4.0.3.

That seems to be the only/best solution right now.

@goremykin
Copy link

Same issue
Linux Mint Cinnamon 19.3
qbittorrent 4.2.5

@wifon
Copy link
Author

wifon commented May 16, 2020

This problem remains in 4.2.5. Any progress in a fix?

@awsms
Copy link

awsms commented Jun 22, 2020

I like how there is a "Can't reproduce" label, while I'm having this same exact issue on three different machines, all having different hardware and OS.

This problem remains in 4.2.5. Any progress in a fix?

The best and only solution right now is to downgrade to any <4.2 version.

@FranciscoPombal
Copy link
Member

I like how there is a "Can't reproduce" label, while I'm having this same exact issue on three different machines, all having different hardware and OS.

The "Can't reproduce" label means that no project member has been able to reproduce thus far, which means that from our PoV, this might as well be due to an issue with an external dependency or some other problem with users' systems.

Until someone posts detailed steps to reproduce and useful diagnostics information (like I have suggested above months ago, but no one took me up on it: #11822 (comment)), nothing can be done.

@empirenarrative
Copy link

Until someone posts detailed steps to reproduce and useful diagnostics information (like I have suggested above months ago, but no one took me up on it: #11822 (comment)), nothing can be done.

I see your point, but those of us that have been using qB on the same machine for many years and only see this bug with the 4.2.5 update will have to differ.

@goremykin
Copy link

@FranciscoPombal, To reproduce this bug, just take a linux mint image, run it from a flash drive, install and run qbittorrent

@HiFiPhile
Copy link
Contributor

@FranciscoPombal
In my experience, this may be related to GPU performance. I'm running qBittorrent on Debian 10 under KVM.

Previously I was using Standard VGA as display device, when I have more than 100 torrents the UI become completely frozen.

Than I changed the display device to VirtIO-GPU (better performance), since then it turns out pretty well.

@goremykin
Copy link

@FranciscoPombal, I am not sure because I faced issue on linux mint, but it works perfectly on kde neon on the same machine

@FranciscoPombal
Copy link
Member

@empirenarrative

Until someone posts detailed steps to reproduce and useful diagnostics information (like I have suggested above months ago, but no one took me up on it: #11822 (comment)), nothing can be done.

I see your point, but those of us that have been using qB on the same machine for many years and only see this bug with the 4.2.5 update will have to differ.

Differ about what? The excerpt you are quoting says/means "we need useful, actionable information to first determine if the problem is related to qBittorrent, and then, if that's the case, to fix it". This is not only a reasonable request, it's the only logical one and the only way forward. Without more info, the fact that it seemed to start happening after the upgrade to a certain version could be just coincidence, or just the case that something else crucial changed on your system or just isn't able to keep up anymore - see #11822 (comment) as an example.

@goremukin

@FranciscoPombal, To reproduce this bug, just take a linux mint image, run it from a flash drive, install and run qbittorrent

@FranciscoPombal, I am not sure because I faced issue on linux mint, but it works perfectly on kde neon on the same machine

In that case, what makes you think this is an issue with qBIttorrent and not with something else in Mint? Mint could be setting suboptimal GPU/graphics settings (like using the nouveau driver if you have NVIDIA graphics), for example. I'll try to reproduce in a Mint image in the meantime.

@HiFiPhile

@FranciscoPombal
In my experience, this may be related to GPU performance. I'm running qBittorrent on Debian 10 under KVM.

Previously I was using Standard VGA as display device, when I have more than 100 torrents the UI become completely frozen.

Than I changed the display device to VirtIO-GPU (better performance), since then it turns out pretty well.

Thanks for the feedback. This is a good example of why detailed info and steps to reproduce are a must and why I insist so much with that. The detail that this was happening in virtualization turned out to be crucial, but was omitted at first. In your case, it turned out that it was not an issue with qBittorrent, but showing the same symptoms as the OP (although the OP could be running in a VM as well, they haven't specified either - if so, this would be the best case, as the issue would be resolved). Many such cases.

Side note - it's common to experience lag in VMs if graphics settings are not set appropriately - Windows runs like shit in VirtualBox if you don't give it enough graphics memory, for example.

@empirenarrative
Copy link

empirenarrative commented Jun 23, 2020

<.This is not only a reasonable request, it's the only logical one and the only way forward. Without more info, the fact that it seemed to start happening after the upgrade to a certain version could be just coincidence, or just the case that something else crucial changed on your system or just isn't able to keep up anymore - see #11822 (comment) as an example.>

Your point is valid. I also understand that you cannot trust my opinion. Facts are needed to confirm. I've already done this on my end so I don't need to confirm anything for myself. I've performed systematic troubleshooting on my PC to isolate this issue to qB. I will wait patiently for someone else to confirm this issue.
P.S. No virtualization used on my PC.

@FranciscoPombal
Copy link
Member

FranciscoPombal commented Jun 23, 2020

Alright, I tested a bit with 200 torrents, using both Linux Mint Cinnamon 19.3 and Xubuntu 18.04 on bare metal, and here's what I found.

The GUI wasn't laggy in any case, but that could be just because the machine I ran the test on (i5-4690k, RTX 2060) is powerful enough; in Mint, I saw that scrolling the transfer list (artificially scrolling it up and down a lot rather fast, by keeping the mouse pressed on the scrollbar) caused a massive spike in CPU usage (all cores up to 70-90%), mostly due to a process with the command line cinnamon --replace (which I believe is cinnamon's WM/compositor), and a bit from qBittorrent itself. This leads me to believe that cinnamon's WM/compositior is not very efficient.

On the other hand, Xubuntu (which runs Xfce, of course) handled the same situation much better. The scrolling also caused a spike, although much smaller, and this time due to what I believe is the main X11 process on my system, which I guess makes sense - if the screen is updating a lot, I would expect at least the last link in the window manager userland process chain to be more active.

I even ran a small test with callgrind on Xubuntu - not a very thorough one, I did not even have debug symbols (I was using the qBittorrent executable from the official PPA). Even without symbols, I could see that most of the activity came from internal Qt GUI-related stuff, and an enormous amount of calls to somewhere within libX11.so. A lot of calls seemed to be to something related to/with a name like XSetImage/XGetImage - I wonder if this has to do with status icons of each element in the list? @Chocobo1, @glassez, ping.

Conclusion: perhaps qBittorrent's transfer list GUI could be further optimized (this topic deserves a much more extensive and further investigation), but inefficient WM/compositors certainly don't help. @goremukin and everyone else - I encourage you to run Xubuntu (or some other distro with Xfce) from a USB drive on your hardware and see if you get better performance (meaning: less lag and/or less CPU usage) in qBittorrent than when using Mint, to further corroborate my findings so far.

@FranciscoPombal
Copy link
Member

Continued at: #13304

@FranciscoPombal FranciscoPombal removed the Can't reproduce Issues that cannot be reproduced label Aug 30, 2020
@qbittorrent qbittorrent locked and limited conversation to collaborators Aug 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
GUI GUI-related issues/changes Performance
Projects
None yet
Development

No branches or pull requests