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

Scrolling is slow on 4.2.5 with many torrents #12900

Closed
mahfayed opened this issue May 24, 2020 · 20 comments
Closed

Scrolling is slow on 4.2.5 with many torrents #12900

mahfayed opened this issue May 24, 2020 · 20 comments
Labels
Confirmed bug An issue confirmed by project team to be considered as a bug GUI GUI-related issues/changes Performance Qt bugs Bug resides in Qt library

Comments

@mahfayed
Copy link

mahfayed commented May 24, 2020

qBittorrent version and Operating System

(4.2.5 on macOS 10.14.6)

What is the problem

(I have 48 torrents and scrolling through them is extremely slow. When I tap on eg. Contents or Peers and have them open, scrolling through my torrents becomes smooth)

@FranciscoPombal FranciscoPombal added Can't reproduce Issues that cannot be reproduced GUI GUI-related issues/changes labels May 24, 2020
@mahfayed
Copy link
Author

@FranciscoPombal I tried installing a few old versions of qBittorrent and I still got the same problem on all of them. I also managed to reproduce the issue on another Mac. This issue happens on Mac only. Windows is not affected.
Do you need any more details on the problem so maybe you can reproduce it?

@FranciscoPombal
Copy link
Member

@mahfayed well, if the issue seems to be mac-specific, I can't even attempt to reproduce it since I don't have a mac (or a macOS VM). In any case, I don't recall this being an issue for other devs/contributors who use macOS (@Kolcha, for example).

@mahfayed
Copy link
Author

mahfayed commented May 25, 2020

@FranciscoPombal @Kolcha I hope other devs/contributors can look into this problem again, because I was able to reproduce it on another mac.
Also, tabs like Contents, Peers, Trackers have to be closed for the scrolling problem to occur.

@Kolcha
Copy link
Contributor

Kolcha commented May 29, 2020

will try it on macOS this weekend with ~2k torrents
testing on other OSes is also possible

@ghost
Copy link

ghost commented May 29, 2020

I had this problem on Linux Mint, with version 4.2.4 compiled, 4.2.5 and 4.3.0alpha1.
It doesn't happen on the old version 4.0.3.
The scrolling problem occurs regardless of what tabs are open and it affects the whole UI, hovering over buttons lags before they highlight themselves.
The lag goes away when switching to a category with no torrents listed.

@Kolcha
Copy link
Contributor

Kolcha commented May 29, 2020

can't confirm,
macOS 10.15.4, videos attached,
tested official 4.2.5 and 4.3.0alpha (built about ~1 week ago) with ~1800 torrents

it is better to download video for watching, Dropbox' online player drastically decreases its quality...

faced only very light lags when recording screen, without screen recording everything is very smooth. even app startup was very fast (even taking into account that destination folder is SMB share) - it took just about 10 seconds (checking resume data), UI was responsive during that.

that was very impressive... my MacBook is too old and not so powerful...

@mahfayed
Copy link
Author

@Kolcha Thanks for attaching the videos. For me, the scrolling problem is very apparent when you do a very slight scroll then immediately lift your fingers off the trackpad. You should notice a slight lag (look at the scroll bar) in qBittorrent vs if you try that on eg. Firefox, it should be smooth.

@Kolcha
Copy link
Contributor

Kolcha commented May 30, 2020

@mahfayed I understood what you mean... This is maybe not so noticeable on video, but there is some delay between scroll gesture and UI response, and this delay significantly decreases when any "info" panel is open (I used "General"), it becomes much smoother in such case. But actually this doesn't depend on opened tabs, it just depends on torrent list visible area: larger area leads to more noticeable lags. Just try to resize "info" panel or window itself.

so, based on this observation I think that problem somewhere inside Qt rather than qBittorrent... only one option I can see what can be wrong on qBittorrent side, that is qBittorrent uses some expensive function when painting list item, but I don't know how to check it... also it is may be related to Qt' Fusion style, which is used to draw progress bar. in any case, most likely this is Qt issue, because it is platform-specific, but I can be wrong...

@ghost
Copy link

ghost commented May 30, 2020

@Kolcha On Linux Mint I can confirm resizing the the panel or window to reduce the number of torrents displayed reduces the lag.

@mahfayed
Copy link
Author

@Kolcha Will other devs/contributors further investigate this issue or it will be closed?

@Kolcha
Copy link
Contributor

Kolcha commented May 31, 2020

@mahfayed I can't say anything regarding this... I'm just an user who can test/check something...
but from my point of view it should be kept open.

@FranciscoPombal
Copy link
Member

@Kolcha

can't confirm,

(...) but there is some delay between scroll gesture and UI response, and this delay significantly decreases when any "info" panel is open (I used "General"), it becomes much smoother in such case. But actually this doesn't depend on opened tabs, it just depends on torrent list visible area: larger area leads to more noticeable lags. Just try to resize "info" panel or window itself.

So which is it? Is it fair to remove the "Can't reproduce" label in this case, or should it be kept?

@mahfayed

@Kolcha Will other devs/contributors further investigate this issue or it will be closed?

It will be kept opened until it is either:

  • resolved, if it is due to qBittorrent itself (but we don't even know this at this point)
  • confirmed that the issue lies with the Qt library (or another external library).

@Kolcha
Copy link
Contributor

Kolcha commented Jun 1, 2020

So which is it? Is it fair to remove the "Can't reproduce" label in this case, or should it be kept?

now I can confirm that some issue exists #12900 (comment) , so I think "Can't reproduce" label should be removed.
initially I tested just fast scrolling a lot of torrents, so it is not so noticeable, but after this comment #12900 (comment) I did another test, and it shows problem.

issue may be as in qBittorrent itself (too heavy stuff in drawing function) or in Qt, I have no idea how to check it

@FranciscoPombal FranciscoPombal added Confirmed bug An issue confirmed by project team to be considered as a bug and removed Can't reproduce Issues that cannot be reproduced labels Jun 1, 2020
@jagannatharjun
Copy link
Member

@Kolcha you can hide "progress bar" column and try again, that will confirm if slowdown reason is fusion style progress bar or not.

@jagannatharjun
Copy link
Member

@FranciscoPombal FranciscoPombal added the Qt bugs Bug resides in Qt library label Aug 29, 2020
@puddingsoda
Copy link

@jagannatharjun I'm getting this issue as well on macOS on 4.3.2. I have about 50 and it lags a lot when scrolling through. I checked my CPU usage and it jumps up to 100% whenever I scroll. This leads me to believe that the app is doing something extremely inefficient (maybe refreshing the scroll view many times when scrolling) resulting in this high CPU usage and intense lag.

This is a little disappointing given that qBit is supposed to be a relatively "lightweight" client but is actually eating up CPU and battery when doing basic scrolling in the app. But I don't blame the developers because I'm sure they would have fixed it if they knew the issue.

@puddingsoda
Copy link

After some more testing I have found the cause of the lag. The UI will start to lag more the bigger the window size of the torrents. If you decrease the number of torrents that can be seen at one time, for example by clicking on the content pane or by making the window smaller, the lag becomes less harsh.

This is likely more of a problem with older Macs. If you have a Mac with a recent Intel or M-series processor, it is unlikely you will suffer from the lag as much. On my Mac the frame rate goes down to 3-4 while scrolling through a couple dozen torrents.

My point about the inefficient scroll view refreshing still stands. I see a CPU spike of 100% when scrolling in qBittorrent. This should not be happening. When I scroll through a list in any other app, it barely breaks 20% CPU usage. I assume this is an issue in qBittorrent simply because it wasn't coded "natively" for the macOS platform.

@douira
Copy link

douira commented Oct 6, 2021

I am experiencing this issue with slow scrolling on v4.3.8 on macOS Big Sur. I'm displaying 124 torrents in the list and scrolling is around 5 fps. During scrolling Activity Monitor displays 90% CPU usge (1 core) for qBittorrent.app. @jagannatharjun hiding the scroll bar didn't solve the issue for me. My CPU is an Intel 6700K and the GPU is a RX 6900 XT. (so not slow actually, but the CPU is a few years old)

@ghost
Copy link

ghost commented Jul 21, 2022

Issue was reported to be fixed upstream https://bugreports.qt.io/browse/QTBUG-73117
If anyone can still reproduce with latest qt that contains the patch, feel free to comment to re-open.

@ghost ghost closed this as completed Jul 21, 2022
@Dr-Bluemond
Copy link

I've noticed when I am scrolling, cpu occupation went high while gpu occupation was always zero. I guess that's the problem that makes scrolling not smooth enough.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Confirmed bug An issue confirmed by project team to be considered as a bug GUI GUI-related issues/changes Performance Qt bugs Bug resides in Qt library
Projects
None yet
Development

No branches or pull requests

8 participants