https://bugs.kde.org/show_bug.cgi?id=504287
Fabian Vogt <fab...@ritter-vogt.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fab...@ritter-vogt.de --- Comment #2 from Fabian Vogt <fab...@ritter-vogt.de> --- (In reply to Ilya Bizyaev from comment #0) > SUMMARY > When browsing directories with restricted (unreadable) subdirectories, such > as /tmp, the KDE file dialog has major UI lags if the system has many > groups. This affects file pickers in KDE and Qt apps, as well as the XDG > portal. > > This is caused by repeated calls to KUser::groups from the paint code, which > calls getgrouplist, which has to read and parse /etc/group and > /etc/group.cache over and over again. See the attached flame graph. > > $ cat /etc/group.cache | wc -l > 27634 > $ du -h /etc/group.cache > 752K /etc/group.cache > > There should be no need for this: getgrouplist's result can be cached and > reused for the duration of the dialog's execution. IMO it should just use access(R_OK) instead. Apparently this behaviour of trying to handle permission checks in KIO code was introduced by https://invent.kde.org/frameworks/kio/-/merge_requests/1221, ironically with the motivation to avoid stat() calls. -- You are receiving this mail because: You are watching all bug changes.