-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Browser freezes when attempting to download #7222
Comments
Using qtwebengine 6.3, I can't reproduce a freeze, but 'downloading' versus 'not downloading' a 2.66GB file with ~5Mb/s causes a 40-75% CPU usage increase in the This does seem a bit high. However, it doesn't at all freeze the browser, nor does it slow down my laptop in general.
Not sure if I follow; maybe you could include a concrete example/URL? |
I also couldn't reproduce slow download starts, downloading linux ISOs (qt6-v2, QtWebEngine 6.3, based on Chromium 94.0.4606.126, X11). (I got somewhat distracted by the CPU usage while a download was going on, #5376 helps a little bit because there are lots of QTimerEvent(0) triggers for the GUI thread, but I don't think the CPU usage is in our code in the end, maybe) |
Not seeing this anymore. Linux ISOs start at >40%, and then stays there with occasional drops into 20%. By comparison, |
FWIW I'm sometimes seeing this: There is a few seconds of delay before the download dialog opens. I saw it with Qt 5 as well, but only when there are hundreds/thousands of files in the download folder. It seems to happen more often (but not always) with Qt 6 to me, even with a nearly empty downloads folder. |
Ah right, I have no download dialog, but just always download to |
Python stacktrace when this happens:
C++ stack seems to be:
with the file paths pointing to The C++ stack seems to hang there pretty consistently judging by a quick @amosbird could it be something similar for you, with your download directory containing a lot of files? |
Nope, only several files. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Weirdly enough, for me, it looks like all Qt applications on my system freeze while I'm waiting for the download dialog to open?! e.g. Telegram Desktop also doesn't respond anymore for a while after clicking a qutebrowser download link. |
Seems like this happens when choosing a file to upload too, when using the default Qt dialog and navigating it to a folder with lots of files. Strace is showing logs of groups of files accesses like:
Seems like it could be the same as this issue: https://bugreports.qt.io/browse/QTBUG-110416 |
I am having the same problem recently: whenever I click on a download link, the entire qutebrowser (including e.g. a video playing in another tab) freezes for a few seconds before the download dialog is displayed. My Looking at |
After poking around in the source a bit, I get the impression that the use of https://doc.qt.io/qt-6/qfilesystemmodel.html#caching-and-performance This claims that |
I agree it's probably something with the I wonder if the
|
I tried the As an alternative, I tried setting the icon provider via
No idea what that is supposed to do. But at least for my ~3000 files in |
@fstecker Thanks for taking a look! I think this warrants some more detailed investigation before going for a band-aid fix, but any chance you could post a diff here or perhaps open a PR? |
Overloading the The only alternative I can think of right now would be to not use |
Looks like this is pretty much known upstream, but nobody seems to care too much:
So yeah, I suppose this is an appropriate solution, short of writing completely custom file system handling. |
I'm going to mark this as fixed by #7925 for now. I'm confident that we identified and resolved one issue that was affected several users (you've got lots of files in your download directory, the download dialog is slow to respond). It's not 100% clear if everyone who contributed to this issue was running into the same thing or if there is some other issue. We can re-open this or a new issue as appropriate in that case. |
Version info:
qutebrowser v2.5.0
Git commit: 2cbefa1 on qt6-v2 (2022-05-30 22:00:13 +0800)
Backend: QtWebEngine 6.3, based on Chromium 94.0.4606.126
Qt: 6.3.0
Does the bug happen if you start with
--temp-basedir
?:Yes
Description
It's very slow to do downloading on the qt6 branch. I have to wait for at least 20 seconds to see the download prompt after clicking some download button, and during
the time, CPU reaches 100%
How to reproduce
Try downloading any resource (perhaps >= 1GB) .
The text was updated successfully, but these errors were encountered: