Bug 506541

Summary: System interface stutters when package manager updates mime database
Product: [Plasma] kwin Reporter: trashbin52384
Component: performanceAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: kdedev, valdikss
Priority: NOR    
Version First Reported In: 6.4.1   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description trashbin52384 2025-07-03 17:27:55 UTC
SUMMARY

(Un)Installing software through system package manager causes performance issues if it involves updating mime database cache. Issue is not present for Gnome session.

STEPS TO REPRODUCE
1. $ sudo dnf reinstall shared-mime-info
2. Move mouse cursor in circles


OBSERVED RESULT

Occasional stutters while command executes


EXPECTED RESULT

No performance impact


SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Fedora Linux 42
KDE Plasma Version: 6.4.1
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.1

ADDITIONAL INFORMATION

KDE processes also do a lot of IO while package manager is working (captured with iotop -a -P -b -d 1 -o):

  Total DISK READ:    0,00 B   |   Total DISK WRITE:   76,77 M
Current DISK READ:    0,00 B/s | Current DISK WRITE:    2,96 M/s
   PID PRIO     USER   DISK READ  DISK WRITE SWAPIN     IO COMMAND
  7165 be/4 root          0,00 B      4,15 M   0,00 % 7,91 % update-mime-database
  6732 be/4 *******       0,00 B     21,23 M   0,00 % 0,00 % dolphin
  2969 be/4 *******       0,00 B     11,63 M   0,00 % 1,22 % plasmashell
  7118 be/4 root          0,00 B      9,02 M   0,00 % 0,00 % dnf
  1033 be/3 root          0,00 B   1252,00 K   0,00 % 0,00 % jbd2/dm-1-8
  1126 be/4 root          0,00 B   1700,00 K   0,00 % 0,00 % systemd-journald
  1393 be/3 root          0,00 B    404,00 K   0,00 % 0,00 % jbd2/dm-4-8
  1395 be/3 root          0,00 B    164,00 K   0,00 % 0,00 % jbd2/dm-3-8
  1425 be/3 root          0,00 B     56,00 K   0,00 % 0,00 % jbd2/dm-5-8
  1430 be/3 root          0,00 B      4,00 K   0,00 % 0,00 % jbd2/dm-2-8
  1470 be/3 root          0,00 B      8,00 K   0,00 % 0,00 % auditd
  1784 be/4 root          0,00 B    100,00 K   0,00 % 0,00 % rsyslogd
  2819 be/4 *******       0,00 B     23,80 M   0,00 % 0,00 % kwin_wayland
  4319 be/4 *******       0,00 B    596,00 K   0,00 % 0,00 % firefox
  7104 be/4 root          0,00 B     68,00 K   0,00 % 0,00 % iotop
Comment 1 TraceyC 2025-07-23 02:20:10 UTC
On a KDE Neon Testing VM with no swap, with the same iotop command, I don't see  update-mime-database in the output.
I do see plasma-discover having 3.92M read / 15,18G write during an update. It's hard to tell if there's a performance hit because the VM is slow in general.
Comment 2 valdikss 2026-02-10 23:48:15 UTC
Happens every time when I update vscode, which has the following in postinstall:

update-mime-database /usr/share/mime