Bug 397657

Summary: Optimise startup time for "plasma-discover --mode update"
Product: [Applications] Discover Reporter: Nate Graham <nate>
Component: Updates (interactive)Assignee: Aleix Pol <aleixpol>
Status: RESOLVED UPSTREAM    
Severity: wishlist CC: neousr
Priority: NOR Keywords: usability
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Nate Graham 2018-08-20 13:48:04 UTC
Right now, the notifier plasmoid only has a button that opens Discover so that you can perform the updates there. It might be nice to add an "Update All" button to the notifier plasmoid as well, so that users who don't care about the technical details can just immediately run the updates. Ideally once they click on the button, a progress bar would appear to show the status of the update job.
Comment 1 Aleix Pol 2018-10-11 17:05:11 UTC
We can't do that because we'd have to include all the logic on plasma and it's not a burden I'd like to add there.

It would be possible to have a mode that when you press it opens, performs the update and closes immediately. I don't know if this would help.

This way we'd also have UI in case there's questions about the update (e.g. do you want to remove these packages and such). But then you're only saving the start and close clicks.
Comment 2 Nate Graham 2018-10-11 22:31:59 UTC
:(

The problem is that it's just not a great user experience right now:
1. Click on tray icon
2. Click on "View Updates" button
3. Wait for Discover to launch (usually 1-5 seconds)
4. Wait for Discover to update its list of updates (usually 5-60 seconds)
5. Click on "Update All"
6. Wait for updates to complete (usually 1-15 minutes)
7. Close Discover

Compared to the proposed:
1. Click on tray icon
2. Click "Update everything" if you don't care to see all the technical details

I can appreciate the technical issues involved with adding the proposed feature, but, well, Discover is the face of how we perform updates in Plasma and I think if would be nice if we could create a path that makes it as easy as possible for people who don't care about the technical details.

Is there any other way we can improve this situation?
Comment 3 Neousr 2018-10-12 01:15:22 UTC
As a user that have been using Plasma 5 since a couple of years. The points 3 and 4 are the ones that makes updating a bit more tedious that it should be.

Specially number 4 Discover takes a bit to load the lists and then a little bit more to get the "download size" until you can perform the updates. On my opinion this makes discover feel more slow that it really is.

Don't know if that is an already reported issue or an area to improve.

As a way to improve can be an option to auto-close discover after a successful update be a little improvement and thus removing 7 from the list.
Comment 4 Aleix Pol 2018-10-12 13:21:09 UTC
This slowness is due to aptcc backend in PackageKit. I opened an issue there:
https://github.com/hughsie/PackageKit/issues/287

Problem is that when the cache is a bit old (1h by default but configurable IIRC) and Discover fetches it, it notifies of new updates which makes us query twice for updates and it looks rather odd admittedly.