Pamac-gtk lag when opening from sys-tray icon

When I open pamac from the update notification in the system tray and deselect a package I get a massive lag spike (pamac hangs for multiple seconds).

If I start it from App-Starter and go to the updates tab and deselect a package, it is nice and snappy.

The system runs plasma with wayland.

The second time you do the same operation is faster than the first time?

Same delay when you do the first operation once again?

A few seconds delay is totally normal and expected - for me, as my system is using spinning disks, which will need some time to access the data.

Perhaps replace pamac-gtk with pamac-gtk3?

I can’t advise - I don’t use it. I use pacman and yay.
I even uninstalled pamac completely in one of my (virtual) machines.

If I close pamac and open it again using the system-tray icon, I get the same delay.

I can totally work around the delay, so I would not expect it to exist in the first place.
Checking for updates will of course take time, but deselecting one should be instant?

The starter invokes
pamac-manager
The system tray icon does
pamac-manager --updates
Running both from command line, the first works fine, the other reproduces the problem.
This seems to be a Wayland issue.
Can someone please try to reproduce this?

Yeah, I can reproduce this if AUR, flatpak or snap support is enabled. Disable it and the “lag” is gone. The reason is simply a big database.

Thx.
How come the lag is gone if I start it using pamac-manager?
The database size does not change from that.

With --updates the system explicitly checks for updates first, which blocks the process when changing tabs, since the “Installed” or “Browse” tab is only loaded/executed when you click on it and not before. This is why it gets stuck because the database is updated first, and then the installed packages are displayed. So the order matters here due to the big database and because it doesn’t run in parallel. So normally a frontend dev would block switching tabs here, so gray them out for example.

Run it for example like that:

LC_ALL=C G_MESSAGES_DEBUG=all GSK_RENDERER=opengl pamac-manager --updates 

And you see it in the debug log.

1 Like

You seem to refer to the loading of the updates.
This is not what I am talking about.

Please let me restate the problem:
Case 1:

  1. run pacman-manager
  2. Click the updates tab
  3. Wait until the tab is loaded
  4. Deselect an update
  5. Update gets instantly deselected

Case 2:

  1. run pacman-manager --update
  2. Wait until the update tab is loaded
  3. Deselect a package
  4. Wait quite some time while the UI is not responding until the update is actually deselected

This is what I am referring to. This lag should not exist. Close to nothing should be loading here.

Why not?
The update strategy has to be recalculated again -
you deselected a package that would have been included in the update,
but you opted to not to include one or more packages in the update,
to hold it back …

Incomplete updates will eventually lead to a broken system …

Nope, sorry. Cannot reproduce it.

$ pamac-manager --version
Pamac  11.7.2-3

running pamac-manager --updates and pamac-manager from the CLI.

Unless I completely misunderstand what the OP is talking about, I am unable to reproduce it, I have AUR and flatpak enabled, but not snap.

There is the expected wait time while the database is refreshed, otherwise no issues.