Why is KDE Discover slower than "zypper dup"

I am using OpenSUSE TW and I do sometimes sleep a PC for couple of days…usually it requires big update later, but what I noticed, for some reason “zypper dup” is faster than KDE Discover. Why is that? I’ll add that its not about flatpaks, as they got installed after i’ve done “zypper dup” when I was testing that. Literally I needed to update and reboot system fast that time, and discover was updating it for 20 mins, I canceled and done zypper dup, and it lasted like a minute or 2. I know I can “just use” zypper dup, but I’m curious why that happens. Maybe you will say I am stupido, but on discord they all agreed its better to ask here on forum even the dumb/curious questions so I do. Thank you.

Easy. The majority of GUI apps are inherently slower than text based command line apps.

Because of the extra processing, and maybe, extra memory required … because they have to access lower level libraries, etc.

maybe im misunderstanding but

zypper dup doesn’t update flatpaks.

sudo flatpak update will update flatpaks in a terminal.

I’m not sure that rendering and other stuff would take up all PC resources…

Maybe when you do this the packages are in the cache, maybe even installed… So zypper dup only concludes what Discover started.

Anyway I think Discover is slower than zypper dup, but not 20 to 2… Maybe 20 to 15 or so… Or maybe Discover is fast as zypper, I never try to measure it (this may be done by update once, snapper rollback, and try the other method).

It isn’t the GUI. Discover uses packagekit as underlying software management system. And zypper…is zypper. So two different tools with different mechanics, capabiltys and more.

1 Like

I read somewhere that it uses zypper somehow, but then there should be no difference (excluding flatpaks) in update time.

I can’t snapper rollback, and yeah I was like “maybe it just finished the discover’s job”, but I canceled on 74% Discover, so almost 30% in 2mins?

No exactly.

PackageKitGlib-1_0   | Introspection bindings for PackageKit's GLib integration                           | Paquete
karl@rhuidean:~> zypper se packagekit |grep zypp
(...)
i+ | PackageKit-backend-zypp          | Zypp backend for the PackageKit installation management software                   | Paquete

zypper can’t install nothing. Both uses Zypp

zypper se zypp
(...)
i+ | libzypp                          | Library for package, patch, pattern and product management                      | Paquete
(...)
1 Like

packagekit does not depend on zypp neccessarely. It may also use dnf as backend.

PackageKit-backend-dnf

So zypper and Discover still uses different ways to call the underlying backend (zypp or dnf) which may explain some speed differences. By using zypper, packagekit is not involved at all. So one layer less.

I didn’t say that. Discover uses packagekit to manage the updates of the distro system. dnf in Red Hat family, Zypp in SUSE/openSUSE… And more, starting with Apt. PackageKit - Wikipedia

In openSUSE you can use dnf instead zypper. So you could use packagekit-backend-dnf instead packagekit-backend-zypp. But in openSUSE this is not a default setup.

Sure this can implies some different as I said before, but these are little differences: a few seconds starting the app, a few seconds to evaluate the dependencies, a few more seconds after the download after start the install process itself… But one or two minutes in a 15 minutes upgrade, not 2 or 5 against 15.

2 Likes

@deebido You shouldn’t be installing or updating flatpaks from a system level. They should be installed at a user level, so no sudo required…

flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

flatpak --user install  <some flatpak>

Then look at using com.github.tchx84.Flatseal for any configuration…

1 Like

But system is the default setup. If you want user level, you have to add it

1 Like