-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
Make loading updates async from main AppCenter window #1471
Comments
I don't know if there's any good tooling to check what is blocking an application's main thread, but running in gdb and hitting ctrl+c when the UI is blocked is one way to get a trace of what seems to be blocking. One thing I'm seeing is the call to I think there are various other issues like that (in both the flatpak and packagekit backends). Given there doesn't seem to by an asynchronous API for this, presumably all such calls into |
@ids1024 Most of the long running operations in the Backend classes are already run in a separate thread. There's a thread pool and a pattern of a public async method queueing up work via a private internal worker method on that pool. You'll definitely see that for the install/update/remove methods. It's possible that this specific one was just missed for some reason. |
Yes, most of those operations happen in a background thread, but this issue seems to exist due to a few that do not. It seems like there should be a good way to profile what functions are blocking the UI thread. That would help for getting a more complete picture of what issues there are here. |
I believe sysprof's "speedtrack" should be able to identify blocking I/O happening on the main thread. |
I’ve noticed that checking for app updates blocks the main thread rather considerably (to the point where I thought the app had hung the first few times it happens). I can reproduce every time I launch AppCenter. |
A full year is gone and I can still reproduce: are there any updates on this? |
What Happened
Trying to do a search for example, will make the AppCenter lock up for a while if the AppCenter is loading a large amount of available upgrades in the background
Expected Behavior
The updating process is seperate from the fronted so that the user does not face lockups just trying use the app normally
Steps to Reproduce
This seems to be less obvious with an SSD, but you can still see it freeze for a second even with a small number of available upgrades
Platform Information
elementary OS 6 Daily
Tested on Lenovo ThinkPad X240 and desktop with AMD Ryzen 3 1200 & RX 570
The text was updated successfully, but these errors were encountered: