Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

konsole is slow to start, stats too many icons #67691

Closed
ivan opened this issue Aug 29, 2019 · 8 comments
Closed

konsole is slow to start, stats too many icons #67691

ivan opened this issue Aug 29, 2019 · 8 comments
Labels
0.kind: bug Something is broken 1.severity: blocker This is preventing another PR or issue from being completed 6.topic: qt/kde
Milestone

Comments

@ivan
Copy link
Member

ivan commented Aug 29, 2019

Describe the bug

konsole is slow to start because it tries to stat ~120K icon files. For some icons, it tries to stat every icon size in every theme.

To Reproduce
Steps to reproduce the behavior:

  1. Run NixOS master with services.xserver.desktopManager.xfce4-14.enable = true;
  2. Run konsole and observe 1 second startup; strace to see way too many stats

I did not test plasma to see if it reproduces there.

Additional context

NixOS master

$ /run/current-system/sw/bin/konsole --version
konsole 19.04.1

$ strace /run/current-system/sw/bin/konsole 2>&1 | grep /share/icons/ | wc -l
120065

Startup time is ~1s

I also built konsole 18.08.1 (with dependencies left unchanged) and it had the same problem, so it is not a recent regression in konsole itself.

Ubuntu 19.04

$ strace konsole 2>&1 | grep /share/icons/ | wc -l
968

Startup time is ~250ms

Metadata

  • system: "x86_64-linux"
  • host os: Linux 4.19.68-hardened, NixOS, 19.09.git.2610a7b (Loris)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.2.2
  • channels(root): "nixos-18.09.1922.97e0d53d669"
  • channels(at): ""
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:

cc maintainer @ttuegel

@ivan ivan added the 0.kind: bug Something is broken label Aug 29, 2019
@matthewbauer
Copy link
Member

This could be from XDG_DATA_DIRS or XCURSOR_PATH values? Maybe try messing with those to see if it changes things. My values on KDE are smaller though:

$ strace konsole 2>&1 | grep /share/icons/ | wc -l
1896

@ivan
Copy link
Member Author

ivan commented Aug 29, 2019

my XCURSOR_PATH looks small and reasonable, but XDG_DATA_DIRS is large:

XDG_DATA_DIRS=/nix/store/3snj4802y1h7hi4asqgdgkd5mhnyxjl8-konsole-19.04.1/share:
/nix/store/6zqkwqqrly2ad2v7pivy82s7ams3ykwg-knewstuff-5.58.0/share:
/nix/store/mx2fir1j9ycl2qvbjn58vdzlhhsk6g34-kpty-5.58.0/share:
/nix/store/ash4mz25d8xma4q0422b0rir7kz2fl5s-knotifyconfig-5.58.0/share:
/nix/store/mjvfhv0ffv5fwb1csgzrfas57m808fs1-kdelibs4support-5.58.0/share:
/nix/store/y35v7nyls21sax25qp055v3x0s7fi6p8-kded-5.58.0/share:
/nix/store/d1f0jzjb70g9jpf1f4292r361hqk93ij-kunitconversion-5.58.0/share:
/nix/store/k0rdy8bshzi5y69chi5sgkzr91ipb23n-kparts-5.58.0/share:
/nix/store/668ipix6kdzs3qx3d6kl8klacbn6bnpz-kparts-5.58.0-bin/share:
/nix/store/6iy3n4lks367xcbqjp5vfxjnfk84546f-kinit-5.58.0/share:
/nix/store/7b5g2dpk8s5gsm4xlrsln0sj92p7x3qc-kemoticons-5.58.0-bin/share:
/nix/store/bf10f4j9f4ba37kwgq60fw22cvcb2hgj-kdesignerplugin-5.58.0/share:
/nix/store/j9n8r138qw9a4pxkjbj63shfb23w6l04-kio-5.58.0/share:
/nix/store/bd7fndbdh6dj5c7jy32g27l8ramybnzl-kwallet-5.58.0/share:
/nix/store/xl6qcg1pkfpl4j9lw2g2h04w7hlg3dya-kwallet-5.58.0-bin/share:
/nix/store/6sm4wsm3bk94xbg8gh9k6rfdb9ppphv7-knotifications-5.58.0/share:
/nix/store/5nampsblpflij5lrc61p4ai9kg507g47-knotifications-5.58.0-bin/share:
/nix/store/jwspwwz8080y7x543wsqh4d6w9qz2a10-solid-5.58.0/share:
/nix/store/ny7l1cvx3hdjlp40c3mzx42fq3xx2c36-kjobwidgets-5.58.0/share:
/nix/store/xq5s47p6fiqirza0l499a0bqdqpy643k-kjobwidgets-5.58.0-bin/share:
/nix/store/mzlh1bg8385bknn3ad5cnv1k9cf6nmyd-kio-5.58.0-bin/share:
/nix/store/kjdn5yds6dys24b0gxy8vf6d4p8pmxaz-phonon-qt5-4.10.2/share:
/nix/store/j09ydniwk35haph0cjb76jys4as4mlcc-kbookmarks-5.58.0/share:
/nix/store/qbajl24idfh820kxdqfnnb64z7dv1xhy-kxmlgui-5.58.0/share:
/nix/store/y7xmg8ni6p6ra270r4fn4b4q5w444hnp-ktextwidgets-5.58.0/share:
/nix/store/60q2f18ysf2v35gs278qq7ndnr4syy3p-ktextwidgets-5.58.0-bin/share:
/nix/store/3n3ybqvpz8ip377sfm7c90znv64vpqs1-kcompletion-5.58.0/share:
/nix/store/0cr32rk9rsklr4i59g2xhk3pzy86f9fy-sonnet-5.58.0/share:
/nix/store/dlxvyn38bpdjylk5c661i5kfiymdnk1p-kglobalaccel-5.58.0/share:
/nix/store/acbinf6w0wpwqj7h1vg5pj6hskjc8fzl-kservice-5.58.0/share:
/nix/store/sx9m06z4k9xhx7a9bixn8zfd0sr80xpl-kservice-5.58.0-bin/share:
/nix/store/mf956gj5985nviy1vkc2hh6swnjwjmvh-kdbusaddons-5.58.0/share:
/nix/store/c4xj4i0c0p5i1w1049n9xdfmqwr88pbk-kiconthemes-5.58.0/share:
/nix/store/f7yqxyzib19i3npy5zliv9r2w8qwi3g6-kitemviews-5.58.0/share:
/nix/store/qng41d9bh1rzx8mxxrk7a1yl7mhyg35d-kconfigwidgets-5.58.0/share:
/nix/store/gbz9flv5lwx0db0ajqaswz261pzpjm14-kcoreaddons-5.58.0/share:
/nix/store/j6szdnvkba86nyv4bllz48glvp2kah2s-kcoreaddons-5.58.0-bin/share:
/nix/store/48nwvvvd2ixjkhv77sl1jgap61qs66az-kconfig-5.58.0/share:
/nix/store/cha47w7pq68g6g08m9ka01jix518ylnw-kcodecs-5.58.0/share:
/nix/store/bc3imc75var3g99wpn30brzk0pgdvk3q-kglobalaccel-5.58.0-bin/share:
/nix/store/xgnlxs20pyj0m15jdzqcnjs0dzydmcq2-kwindowsystem-5.58.0/share:
/nix/store/7n6ywg47jxx45yprai36p2sbs6favhj7-kauth-5.58.0/share:
/nix/store/69vcnsqm9wl1qb27493rrvybhjmxhm66-kwidgetsaddons-5.58.0/share:
/nix/store/f9f5c3x08xy92x5zh2fqi5m7gv0309a4-patchelf-0.9/share:
/nix/store/1hsfp26nld0qsn3rj5b08nz28m5nby0f-flex-2.6.4/share:
/nix/store/g2f25j76c1fk3rfgi47pcmr44lmwpprp-bison-3.4.1/share:
/nix/store/f66n8plr4albh1wy7wwna4x91y0hwsbh-kdoctools-5.58.0/share:
/nix/store/j23hkszsnkrh34cvy1j08g0s5hzkdbc2-ki18n-5.58.0/share:
/nix/store/z1fmvm5wmhsy7d52h8bknnzsx1cgq2iw-qtbase-5.12.0/share:
/nix/store/my5a5a07x9p5lhvc2n3ki6l20dfz38zh-systemd-242/share:
/nix/store/qj5mxxzcwksccq69zlq9n49d8j4nvpj4-systemd-242-lib/share:
/nix/store/f9skp1y3jr0658b2vgnnj3ginvj71x9p-glib-2.60.4/share:
/nix/store/3njdywpyqns813nc5f2padax9vsdvyl5-gettext-0.19.8.1/share:
/nix/store/5x82ydyjnbcvdw4fpwx7170qfbf2i4x5-dbus-1.12.16/share:
/nix/store/1nrimml11nlg7spkrq0ki1337cjc4222-expat-2.2.7/share:
/nix/store/ji9kpgmbddkv2l2szzjfqinhja2322k0-xz-5.2.4/share:
/nix/store/hrb88p3rriaqzwcpc7asgfbky0smdsds-kdoctools-5.58.0-dev/share:
/nix/store/vjznmqrvwiawqy7g2ip6jsycyls0zlfz-pkg-config-0.29.2/share:
/nix/store/c8waarcjyhgq8ripcrcnc5xqq792zd9c-cmake-3.14.5/share:
/nix/store/3snj4802y1h7hi4asqgdgkd5mhnyxjl8-konsole-19.04.1/share:
/nix/store/3snj4802y1h7hi4asqgdgkd5mhnyxjl8-konsole-19.04.1/share:
/nix/store/6zqkwqqrly2ad2v7pivy82s7ams3ykwg-knewstuff-5.58.0/share:
/nix/store/mx2fir1j9ycl2qvbjn58vdzlhhsk6g34-kpty-5.58.0/share:
/nix/store/ash4mz25d8xma4q0422b0rir7kz2fl5s-knotifyconfig-5.58.0/share:
/nix/store/mjvfhv0ffv5fwb1csgzrfas57m808fs1-kdelibs4support-5.58.0/share:
/nix/store/y35v7nyls21sax25qp055v3x0s7fi6p8-kded-5.58.0/share:
/nix/store/d1f0jzjb70g9jpf1f4292r361hqk93ij-kunitconversion-5.58.0/share:
/nix/store/k0rdy8bshzi5y69chi5sgkzr91ipb23n-kparts-5.58.0/share:
/nix/store/668ipix6kdzs3qx3d6kl8klacbn6bnpz-kparts-5.58.0-bin/share:
/nix/store/6iy3n4lks367xcbqjp5vfxjnfk84546f-kinit-5.58.0/share:
/nix/store/7b5g2dpk8s5gsm4xlrsln0sj92p7x3qc-kemoticons-5.58.0-bin/share:
/nix/store/bf10f4j9f4ba37kwgq60fw22cvcb2hgj-kdesignerplugin-5.58.0/share:
/nix/store/j9n8r138qw9a4pxkjbj63shfb23w6l04-kio-5.58.0/share:
/nix/store/bd7fndbdh6dj5c7jy32g27l8ramybnzl-kwallet-5.58.0/share:
/nix/store/xl6qcg1pkfpl4j9lw2g2h04w7hlg3dya-kwallet-5.58.0-bin/share:
/nix/store/6sm4wsm3bk94xbg8gh9k6rfdb9ppphv7-knotifications-5.58.0/share:
/nix/store/5nampsblpflij5lrc61p4ai9kg507g47-knotifications-5.58.0-bin/share:
/nix/store/jwspwwz8080y7x543wsqh4d6w9qz2a10-solid-5.58.0/share:
/nix/store/ny7l1cvx3hdjlp40c3mzx42fq3xx2c36-kjobwidgets-5.58.0/share:
/nix/store/xq5s47p6fiqirza0l499a0bqdqpy643k-kjobwidgets-5.58.0-bin/share:
/nix/store/mzlh1bg8385bknn3ad5cnv1k9cf6nmyd-kio-5.58.0-bin/share:
/nix/store/kjdn5yds6dys24b0gxy8vf6d4p8pmxaz-phonon-qt5-4.10.2/share:
/nix/store/j09ydniwk35haph0cjb76jys4as4mlcc-kbookmarks-5.58.0/share:
/nix/store/qbajl24idfh820kxdqfnnb64z7dv1xhy-kxmlgui-5.58.0/share:
/nix/store/y7xmg8ni6p6ra270r4fn4b4q5w444hnp-ktextwidgets-5.58.0/share:
/nix/store/60q2f18ysf2v35gs278qq7ndnr4syy3p-ktextwidgets-5.58.0-bin/share:
/nix/store/3n3ybqvpz8ip377sfm7c90znv64vpqs1-kcompletion-5.58.0/share:
/nix/store/0cr32rk9rsklr4i59g2xhk3pzy86f9fy-sonnet-5.58.0/share:
/nix/store/dlxvyn38bpdjylk5c661i5kfiymdnk1p-kglobalaccel-5.58.0/share:
/nix/store/acbinf6w0wpwqj7h1vg5pj6hskjc8fzl-kservice-5.58.0/share:
/nix/store/sx9m06z4k9xhx7a9bixn8zfd0sr80xpl-kservice-5.58.0-bin/share:
/nix/store/mf956gj5985nviy1vkc2hh6swnjwjmvh-kdbusaddons-5.58.0/share:
/nix/store/c4xj4i0c0p5i1w1049n9xdfmqwr88pbk-kiconthemes-5.58.0/share:
/nix/store/f7yqxyzib19i3npy5zliv9r2w8qwi3g6-kitemviews-5.58.0/share:
/nix/store/qng41d9bh1rzx8mxxrk7a1yl7mhyg35d-kconfigwidgets-5.58.0/share:
/nix/store/gbz9flv5lwx0db0ajqaswz261pzpjm14-kcoreaddons-5.58.0/share:
/nix/store/j6szdnvkba86nyv4bllz48glvp2kah2s-kcoreaddons-5.58.0-bin/share:
/nix/store/48nwvvvd2ixjkhv77sl1jgap61qs66az-kconfig-5.58.0/share:
/nix/store/cha47w7pq68g6g08m9ka01jix518ylnw-kcodecs-5.58.0/share:
/nix/store/bc3imc75var3g99wpn30brzk0pgdvk3q-kglobalaccel-5.58.0-bin/share:
/nix/store/xgnlxs20pyj0m15jdzqcnjs0dzydmcq2-kwindowsystem-5.58.0/share:
/nix/store/7n6ywg47jxx45yprai36p2sbs6favhj7-kauth-5.58.0/share:
/nix/store/69vcnsqm9wl1qb27493rrvybhjmxhm66-kwidgetsaddons-5.58.0/share:
/nix/store/f9f5c3x08xy92x5zh2fqi5m7gv0309a4-patchelf-0.9/share:
/nix/store/1hsfp26nld0qsn3rj5b08nz28m5nby0f-flex-2.6.4/share:
/nix/store/g2f25j76c1fk3rfgi47pcmr44lmwpprp-bison-3.4.1/share:
/nix/store/f66n8plr4albh1wy7wwna4x91y0hwsbh-kdoctools-5.58.0/share:
/nix/store/j23hkszsnkrh34cvy1j08g0s5hzkdbc2-ki18n-5.58.0/share:
/nix/store/z1fmvm5wmhsy7d52h8bknnzsx1cgq2iw-qtbase-5.12.0/share:
/nix/store/my5a5a07x9p5lhvc2n3ki6l20dfz38zh-systemd-242/share:
/nix/store/qj5mxxzcwksccq69zlq9n49d8j4nvpj4-systemd-242-lib/share:
/nix/store/f9skp1y3jr0658b2vgnnj3ginvj71x9p-glib-2.60.4/share:
/nix/store/3njdywpyqns813nc5f2padax9vsdvyl5-gettext-0.19.8.1/share:
/nix/store/5x82ydyjnbcvdw4fpwx7170qfbf2i4x5-dbus-1.12.16/share:
/nix/store/1nrimml11nlg7spkrq0ki1337cjc4222-expat-2.2.7/share:
/nix/store/ji9kpgmbddkv2l2szzjfqinhja2322k0-xz-5.2.4/share:
/nix/store/hrb88p3rriaqzwcpc7asgfbky0smdsds-kdoctools-5.58.0-dev/share:
/nix/store/vjznmqrvwiawqy7g2ip6jsycyls0zlfz-pkg-config-0.29.2/share:
/nix/store/c8waarcjyhgq8ripcrcnc5xqq792zd9c-cmake-3.14.5/share:
/nix/store/3snj4802y1h7hi4asqgdgkd5mhnyxjl8-konsole-19.04.1/share:
/nix/store/4l7yjlsj5dgcqnaynrfz344h5mllilhm-xfce4-session-4.14.0/share:
/nix/store/zhzgdnnaf34imjw6cf057fjdvl8nnfa6-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10:
/nix/store/vjayily6sjggjj1qdqmg9713rvpl5wvz-gsettings-desktop-schemas-3.32.0/share/gsettings-schemas/gsettings-desktop-schemas-3.32.0:
/nix/store/zhzgdnnaf34imjw6cf057fjdvl8nnfa6-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10:
/nix/store/vjayily6sjggjj1qdqmg9713rvpl5wvz-gsettings-desktop-schemas-3.32.0/share/gsettings-schemas/gsettings-desktop-schemas-3.32.0:
/nix/store/zhzgdnnaf34imjw6cf057fjdvl8nnfa6-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10:
/nix/store/vjayily6sjggjj1qdqmg9713rvpl5wvz-gsettings-desktop-schemas-3.32.0/share/gsettings-schemas/gsettings-desktop-schemas-3.32.0:
/nix/store/zhzgdnnaf34imjw6cf057fjdvl8nnfa6-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10:
/nix/store/vjayily6sjggjj1qdqmg9713rvpl5wvz-gsettings-desktop-schemas-3.32.0/share/gsettings-schemas/gsettings-desktop-schemas-3.32.0:
/nix/store/zhzgdnnaf34imjw6cf057fjdvl8nnfa6-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10:
/nix/store/vjayily6sjggjj1qdqmg9713rvpl5wvz-gsettings-desktop-schemas-3.32.0/share/gsettings-schemas/gsettings-desktop-schemas-3.32.0:
/nix/store/zhzgdnnaf34imjw6cf057fjdvl8nnfa6-gtk+3-3.24.10/share:
/nix/store/j1lc5ir64fbrpdhximk2dmi7aykgj92g-hicolor-icon-theme-0.17/share:
/nix/store/ra2ay87kzj07siwvg1lsd4f5azm261ki-exo-0.12.8/share:
/nix/store/adsvkw3891a37nk7xqg2gwfqjlfsb0zr-cups-2.2.11/share:
/nix/store/2vmr74j60jk7dyi53pfihk3ghfd1kz2z-libxfce4ui-4.14.1/share:
/nix/store/zhzgdnnaf34imjw6cf057fjdvl8nnfa6-gtk+3-3.24.10/share:
/nix/store/j1lc5ir64fbrpdhximk2dmi7aykgj92g-hicolor-icon-theme-0.17/share:
/nix/store/ra2ay87kzj07siwvg1lsd4f5azm261ki-exo-0.12.8/share:
/nix/store/adsvkw3891a37nk7xqg2gwfqjlfsb0zr-cups-2.2.11/share:
/nix/store/2vmr74j60jk7dyi53pfihk3ghfd1kz2z-libxfce4ui-4.14.1/share:
/nix/store/4l7yjlsj5dgcqnaynrfz344h5mllilhm-xfce4-session-4.14.0/share:
/nix/store/zhzgdnnaf34imjw6cf057fjdvl8nnfa6-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10:
/nix/store/vjayily6sjggjj1qdqmg9713rvpl5wvz-gsettings-desktop-schemas-3.32.0/share/gsettings-schemas/gsettings-desktop-schemas-3.32.0:
/nix/store/zhzgdnnaf34imjw6cf057fjdvl8nnfa6-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10:
/nix/store/vjayily6sjggjj1qdqmg9713rvpl5wvz-gsettings-desktop-schemas-3.32.0/share/gsettings-schemas/gsettings-desktop-schemas-3.32.0:
/nix/store/zhzgdnnaf34imjw6cf057fjdvl8nnfa6-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10:
/nix/store/vjayily6sjggjj1qdqmg9713rvpl5wvz-gsettings-desktop-schemas-3.32.0/share/gsettings-schemas/gsettings-desktop-schemas-3.32.0:
/nix/store/zhzgdnnaf34imjw6cf057fjdvl8nnfa6-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10:
/nix/store/vjayily6sjggjj1qdqmg9713rvpl5wvz-gsettings-desktop-schemas-3.32.0/share/gsettings-schemas/gsettings-desktop-schemas-3.32.0:
/nix/store/zhzgdnnaf34imjw6cf057fjdvl8nnfa6-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10:
/nix/store/vjayily6sjggjj1qdqmg9713rvpl5wvz-gsettings-desktop-schemas-3.32.0/share/gsettings-schemas/gsettings-desktop-schemas-3.32.0:
/nix/store/zhzgdnnaf34imjw6cf057fjdvl8nnfa6-gtk+3-3.24.10/share:
/nix/store/j1lc5ir64fbrpdhximk2dmi7aykgj92g-hicolor-icon-theme-0.17/share:
/nix/store/ra2ay87kzj07siwvg1lsd4f5azm261ki-exo-0.12.8/share:
/nix/store/adsvkw3891a37nk7xqg2gwfqjlfsb0zr-cups-2.2.11/share:
/nix/store/2vmr74j60jk7dyi53pfihk3ghfd1kz2z-libxfce4ui-4.14.1/share:
/nix/store/zhzgdnnaf34imjw6cf057fjdvl8nnfa6-gtk+3-3.24.10/share:
/nix/store/j1lc5ir64fbrpdhximk2dmi7aykgj92g-hicolor-icon-theme-0.17/share:
/nix/store/ra2ay87kzj07siwvg1lsd4f5azm261ki-exo-0.12.8/share:
/nix/store/adsvkw3891a37nk7xqg2gwfqjlfsb0zr-cups-2.2.11/share:
/nix/store/2vmr74j60jk7dyi53pfihk3ghfd1kz2z-libxfce4ui-4.14.1/share:
/home/at/.nix-profile/share:
/etc/profiles/per-user/at/share:
/nix/var/nix/profiles/default/share:
/run/current-system/sw/share:
/nix/store/zhzgdnnaf34imjw6cf057fjdvl8nnfa6-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10:
/nix/store/zhzgdnnaf34imjw6cf057fjdvl8nnfa6-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10

Setting it to "" shaves off 250ms on my fast computer:

# time /run/current-system/sw/bin/konsole -e 'zsh -is eval exit'
/run/current-system/sw/bin/konsole -e 'zsh -is eval exit'  0.34s user 0.30s system 97% cpu 0.663 total

# time /run/current-system/sw/bin/konsole -e 'zsh -is eval exit'
/run/current-system/sw/bin/konsole -e 'zsh -is eval exit'  0.32s user 0.32s system 97% cpu 0.653 total

# time XDG_DATA_DIRS="" /run/current-system/sw/bin/konsole -e 'zsh -is eval exit'
XDG_DATA_DIRS="" /run/current-system/sw/bin/konsole -e 'zsh -is eval exit'  0.30s user 0.08s system 95% cpu 0.396 total

# time XDG_DATA_DIRS="" /run/current-system/sw/bin/konsole -e 'zsh -is eval exit'
XDG_DATA_DIRS="" /run/current-system/sw/bin/konsole -e 'zsh -is eval exit'  0.32s user 0.08s system 97% cpu 0.408 total

and 500-1000ms on my slower computer:

# time /run/current-system/sw/bin/konsole -e 'zsh -is eval exit'
/run/current-system/sw/bin/konsole -e 'zsh -is eval exit'  0.84s user 0.78s system 89% cpu 1.811 total

# time /run/current-system/sw/bin/konsole -e 'zsh -is eval exit'
/run/current-system/sw/bin/konsole -e 'zsh -is eval exit'  0.87s user 0.92s system 76% cpu 2.332 total

# time /run/current-system/sw/bin/konsole -e 'zsh -is eval exit'
/run/current-system/sw/bin/konsole -e 'zsh -is eval exit'  0.74s user 0.66s system 86% cpu 1.620 total

# time /run/current-system/sw/bin/konsole -e 'zsh -is eval exit'
/run/current-system/sw/bin/konsole -e 'zsh -is eval exit'  0.63s user 0.60s system 99% cpu 1.227 total

# time /run/current-system/sw/bin/konsole -e 'zsh -is eval exit'
/run/current-system/sw/bin/konsole -e 'zsh -is eval exit'  0.63s user 0.60s system 98% cpu 1.254 total

# time /run/current-system/sw/bin/konsole -e 'zsh -is eval exit'
/run/current-system/sw/bin/konsole -e 'zsh -is eval exit'  0.76s user 0.74s system 78% cpu 1.923 total

# time XDG_DATA_DIRS="" /run/current-system/sw/bin/konsole -e 'zsh -is eval exit'
XDG_DATA_DIRS="" /run/current-system/sw/bin/konsole -e 'zsh -is eval exit'  0.57s user 0.14s system 100% cpu 0.718 total

# time XDG_DATA_DIRS="" /run/current-system/sw/bin/konsole -e 'zsh -is eval exit'
XDG_DATA_DIRS="" /run/current-system/sw/bin/konsole -e 'zsh -is eval exit'  0.58s user 0.17s system 100% cpu 0.737 total

# time XDG_DATA_DIRS="" /run/current-system/sw/bin/konsole -e 'zsh -is eval exit'
XDG_DATA_DIRS="" /run/current-system/sw/bin/konsole -e 'zsh -is eval exit'  0.64s user 0.15s system 95% cpu 0.823 total

# time XDG_DATA_DIRS="" /run/current-system/sw/bin/konsole -e 'zsh -is eval exit'
XDG_DATA_DIRS="" /run/current-system/sw/bin/konsole -e 'zsh -is eval exit'  0.57s user 0.14s system 98% cpu 0.720 total

# time XDG_DATA_DIRS="" /run/current-system/sw/bin/konsole -e 'zsh -is eval exit'
XDG_DATA_DIRS="" /run/current-system/sw/bin/konsole -e 'zsh -is eval exit'  0.56s user 0.17s system 98% cpu 0.737 total

@matthewbauer matthewbauer added this to the 19.09 milestone Aug 29, 2019
@matthewbauer matthewbauer added the 1.severity: blocker This is preventing another PR or issue from being completed label Aug 29, 2019
@matthewbauer
Copy link
Member

I suspect this is fallout from #54525.

@ttuegel
Copy link
Member

ttuegel commented Aug 31, 2019

I notice two separate bugs:

  1. There are some build dependencies in XDG_DATA_DIRS.
  2. About half the entries in XDG_DATA_DIRS are redundant; there should not be XDG data in both the $out and $bin output, yet we are searching both.

@ambrop72
Copy link
Contributor

ambrop72 commented Sep 9, 2019

I think what we need is the capability in makeWrapper and similar to add to a list-type variable only if the value is not already inside.

@lheckemann
Copy link
Member

I believe this is fixed by #69426/#69427. Feel free to reopen or let me know if I'm mistaken.

@ivan
Copy link
Member Author

ivan commented Nov 8, 2019

I cannot reopen, but this is not fixed in xfce4 on release-19.09 (I cannot test master right now, sorry):

# strace /run/current-system/sw/bin/konsole 2>&1 | grep /share/icons/ | wc -l
172132
# echo $XDG_DATA_DIRS | tr ':' '\n' | sort
/etc/profiles/per-user/at/share
/home/at/.nix-profile/share
/nix/store/0h13ga9gn5hvnaspvbymq4jzzinhnw5j-systemd-243-lib/share
/nix/store/0h13ga9gn5hvnaspvbymq4jzzinhnw5j-systemd-243-lib/share
/nix/store/0k8zd1rhbq8kphshhi5g3j6vhkd0s69l-kded-5.61.0/share
/nix/store/0k8zd1rhbq8kphshhi5g3j6vhkd0s69l-kded-5.61.0/share
/nix/store/0v1lym92nnxdcp1bl7l3f5q8h2ixq1gb-kservice-5.61.0-bin/share
/nix/store/0v1lym92nnxdcp1bl7l3f5q8h2ixq1gb-kservice-5.61.0-bin/share
/nix/store/26qn545ypqgn4jc90y0i1r08zfcfy8by-kauth-5.61.0/share
/nix/store/26qn545ypqgn4jc90y0i1r08zfcfy8by-kauth-5.61.0/share
/nix/store/2q2fy7f468ba54kcxz7z6rpmcyz5yanm-konsole-19.08.1/share
/nix/store/2q2fy7f468ba54kcxz7z6rpmcyz5yanm-konsole-19.08.1/share
/nix/store/3vjnl852s4mfnqd8p8v237h1v34yhjip-knotifyconfig-5.61.0/share
/nix/store/3vjnl852s4mfnqd8p8v237h1v34yhjip-knotifyconfig-5.61.0/share
/nix/store/446a4zdrfb2q747gv46lp4x239ih3wdk-kemoticons-5.61.0-bin/share
/nix/store/446a4zdrfb2q747gv46lp4x239ih3wdk-kemoticons-5.61.0-bin/share
/nix/store/4bjb8fimyh6zd6rnvkyq6msmwgflzprb-ktextwidgets-5.61.0-bin/share
/nix/store/4bjb8fimyh6zd6rnvkyq6msmwgflzprb-ktextwidgets-5.61.0-bin/share
/nix/store/4k9d6aa8p2ysaqyjw2nn6cik0sbzza4n-kio-5.61.0-bin/share
/nix/store/4k9d6aa8p2ysaqyjw2nn6cik0sbzza4n-kio-5.61.0-bin/share
/nix/store/4ncg66a8zcf4qry4g0i64jk9gshg9wjc-dbus-1.12.16/share
/nix/store/4ncg66a8zcf4qry4g0i64jk9gshg9wjc-dbus-1.12.16/share
/nix/store/4p492m7f9nwjl3hzfaz2xsw99pj527zr-knotifications-5.61.0/share
/nix/store/4p492m7f9nwjl3hzfaz2xsw99pj527zr-knotifications-5.61.0/share
/nix/store/6p2r0iri6gk0ncm2hkrrgz9v7qhywg13-kjobwidgets-5.61.0/share
/nix/store/6p2r0iri6gk0ncm2hkrrgz9v7qhywg13-kjobwidgets-5.61.0/share
/nix/store/6xcj6sdcaky9hgkf7q476kai6wpaikvc-kparts-5.61.0/share
/nix/store/6xcj6sdcaky9hgkf7q476kai6wpaikvc-kparts-5.61.0/share
/nix/store/796nbbv45dnsqya3wghwndhxc3v518lv-ktextwidgets-5.61.0/share
/nix/store/796nbbv45dnsqya3wghwndhxc3v518lv-ktextwidgets-5.61.0/share
/nix/store/7cgi0x10p4bnm0yjslsm19xicbd4myx3-ki18n-5.61.0/share
/nix/store/7cgi0x10p4bnm0yjslsm19xicbd4myx3-ki18n-5.61.0/share
/nix/store/7dmdf5j7g64rdvdjajcvv3n10m05lja5-kinit-5.61.0/share
/nix/store/7dmdf5j7g64rdvdjajcvv3n10m05lja5-kinit-5.61.0/share
/nix/store/7vcc3xnk78a75mnfs88cgmwj99sxfxcr-kbookmarks-5.61.0/share
/nix/store/7vcc3xnk78a75mnfs88cgmwj99sxfxcr-kbookmarks-5.61.0/share
/nix/store/85di97vaqxmr0k7mvqyj3q41yd1wbpn5-kconfig-5.61.0/share
/nix/store/85di97vaqxmr0k7mvqyj3q41yd1wbpn5-kconfig-5.61.0/share
/nix/store/8s453hn8683q77ylqgyfa3xsah90lagw-cups-2.2.12/share
/nix/store/8s453hn8683q77ylqgyfa3xsah90lagw-cups-2.2.12/share
/nix/store/8s453hn8683q77ylqgyfa3xsah90lagw-cups-2.2.12/share
/nix/store/8s453hn8683q77ylqgyfa3xsah90lagw-cups-2.2.12/share
/nix/store/8wpfzivdsrlf23a6m8p1xgqpi79g7h2k-glib-2.60.7/share
/nix/store/8wpfzivdsrlf23a6m8p1xgqpi79g7h2k-glib-2.60.7/share
/nix/store/a02qr2d1lc5pk3kw12igdsv7adbslc0d-kitemviews-5.61.0/share
/nix/store/a02qr2d1lc5pk3kw12igdsv7adbslc0d-kitemviews-5.61.0/share
/nix/store/a5i3sz3iz0q6d0vrz6ngp0xkd3ca1lzm-kxmlgui-5.61.0/share
/nix/store/a5i3sz3iz0q6d0vrz6ngp0xkd3ca1lzm-kxmlgui-5.61.0/share
/nix/store/a5xx2qb29bmd8bva76bd2ihb8fghdf3g-kwindowsystem-5.61.0/share
/nix/store/a5xx2qb29bmd8bva76bd2ihb8fghdf3g-kwindowsystem-5.61.0/share
/nix/store/abfvn8n7k9k4p6s5rgyzsfyf30syarmy-kconfigwidgets-5.61.0/share
/nix/store/abfvn8n7k9k4p6s5rgyzsfyf30syarmy-kconfigwidgets-5.61.0/share
/nix/store/ag9vmpba17prxjbwy8ci5lqkprnsrzh3-libxfce4ui-4.14.1/share
/nix/store/ag9vmpba17prxjbwy8ci5lqkprnsrzh3-libxfce4ui-4.14.1/share
/nix/store/ag9vmpba17prxjbwy8ci5lqkprnsrzh3-libxfce4ui-4.14.1/share
/nix/store/ag9vmpba17prxjbwy8ci5lqkprnsrzh3-libxfce4ui-4.14.1/share
/nix/store/bild1sdd1avh4vlcm1iz0n7ijgmyzkyb-kdesignerplugin-5.61.0/share
/nix/store/bild1sdd1avh4vlcm1iz0n7ijgmyzkyb-kdesignerplugin-5.61.0/share
/nix/store/bivrxn6bfzki4fgfkzn3r5c8c1cfvb1x-knewstuff-5.61.0/share
/nix/store/bivrxn6bfzki4fgfkzn3r5c8c1cfvb1x-knewstuff-5.61.0/share
/nix/store/c86fm1j5xh11dkd9r75qlz0nlngpgxrc-xz-5.2.4/share
/nix/store/c86fm1j5xh11dkd9r75qlz0nlngpgxrc-xz-5.2.4/share
/nix/store/d46x3wsv502da22yigyy0f9kgwa4b68i-kglobalaccel-5.61.0/share
/nix/store/d46x3wsv502da22yigyy0f9kgwa4b68i-kglobalaccel-5.61.0/share
/nix/store/fgfml6m2if117z7vza0qdak478f1pgqa-kcompletion-5.61.0/share
/nix/store/fgfml6m2if117z7vza0qdak478f1pgqa-kcompletion-5.61.0/share
/nix/store/fmbfrbni00vvphq9d429b7q88397cix7-flex-2.6.4/share
/nix/store/fmbfrbni00vvphq9d429b7q88397cix7-flex-2.6.4/share
/nix/store/g6csawl6k7jxd2w41z1iggrhqn77ryx8-gtk+3-3.24.10/share
/nix/store/g6csawl6k7jxd2w41z1iggrhqn77ryx8-gtk+3-3.24.10/share
/nix/store/g6csawl6k7jxd2w41z1iggrhqn77ryx8-gtk+3-3.24.10/share
/nix/store/g6csawl6k7jxd2w41z1iggrhqn77ryx8-gtk+3-3.24.10/share
/nix/store/g6csawl6k7jxd2w41z1iggrhqn77ryx8-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10
/nix/store/g6csawl6k7jxd2w41z1iggrhqn77ryx8-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10
/nix/store/g6csawl6k7jxd2w41z1iggrhqn77ryx8-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10
/nix/store/g6csawl6k7jxd2w41z1iggrhqn77ryx8-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10
/nix/store/g6csawl6k7jxd2w41z1iggrhqn77ryx8-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10
/nix/store/g6csawl6k7jxd2w41z1iggrhqn77ryx8-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10
/nix/store/g6csawl6k7jxd2w41z1iggrhqn77ryx8-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10
/nix/store/g6csawl6k7jxd2w41z1iggrhqn77ryx8-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10
/nix/store/g6csawl6k7jxd2w41z1iggrhqn77ryx8-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10
/nix/store/g6csawl6k7jxd2w41z1iggrhqn77ryx8-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10
/nix/store/g6csawl6k7jxd2w41z1iggrhqn77ryx8-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10
/nix/store/g6csawl6k7jxd2w41z1iggrhqn77ryx8-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10
/nix/store/gajzhkpls5bhqgb9l617pkfxkrwf08na-kjobwidgets-5.61.0-bin/share
/nix/store/gajzhkpls5bhqgb9l617pkfxkrwf08na-kjobwidgets-5.61.0-bin/share
/nix/store/gz39vgf48ycvdd4b5484r5dkyx47sqal-kglobalaccel-5.61.0-bin/share
/nix/store/gz39vgf48ycvdd4b5484r5dkyx47sqal-kglobalaccel-5.61.0-bin/share
/nix/store/hvry76s75hpym72z262519xmq0yljraw-kservice-5.61.0/share
/nix/store/hvry76s75hpym72z262519xmq0yljraw-kservice-5.61.0/share
/nix/store/ijfn92hbqwg7cfvifanr6q0p99bmn212-kiconthemes-5.61.0/share
/nix/store/ijfn92hbqwg7cfvifanr6q0p99bmn212-kiconthemes-5.61.0/share
/nix/store/im61ipy2mh7xr7v185jmsdm3p9qx4020-phonon-qt5-4.10.3/share
/nix/store/im61ipy2mh7xr7v185jmsdm3p9qx4020-phonon-qt5-4.10.3/share
/nix/store/jl484rd0cbyhvp5q13d8hcd1iq6mvcpr-kcodecs-5.61.0/share
/nix/store/jl484rd0cbyhvp5q13d8hcd1iq6mvcpr-kcodecs-5.61.0/share
/nix/store/jlxp6qkp23l34lfljpqj94ppiwd3f5n3-hicolor-icon-theme-0.17/share
/nix/store/jlxp6qkp23l34lfljpqj94ppiwd3f5n3-hicolor-icon-theme-0.17/share
/nix/store/jlxp6qkp23l34lfljpqj94ppiwd3f5n3-hicolor-icon-theme-0.17/share
/nix/store/jlxp6qkp23l34lfljpqj94ppiwd3f5n3-hicolor-icon-theme-0.17/share
/nix/store/jm85jzq8rxqrgxmbbxwc6q4r6j341p14-kcoreaddons-5.61.0/share
/nix/store/jm85jzq8rxqrgxmbbxwc6q4r6j341p14-kcoreaddons-5.61.0/share
/nix/store/jq5ymibqcvbdff02ahip4xq4w4nscf5q-kwidgetsaddons-5.61.0/share
/nix/store/jq5ymibqcvbdff02ahip4xq4w4nscf5q-kwidgetsaddons-5.61.0/share
/nix/store/jy56vczryyq6g3wphmmyz7kn756jk304-kdoctools-5.61.0/share
/nix/store/jy56vczryyq6g3wphmmyz7kn756jk304-kdoctools-5.61.0/share
/nix/store/k01336mgicd7y0vsqcm590iisk0cmipl-gsettings-desktop-schemas-3.32.0/share/gsettings-schemas/gsettings-desktop-schemas-3.32.0
/nix/store/k01336mgicd7y0vsqcm590iisk0cmipl-gsettings-desktop-schemas-3.32.0/share/gsettings-schemas/gsettings-desktop-schemas-3.32.0
/nix/store/k01336mgicd7y0vsqcm590iisk0cmipl-gsettings-desktop-schemas-3.32.0/share/gsettings-schemas/gsettings-desktop-schemas-3.32.0
/nix/store/k01336mgicd7y0vsqcm590iisk0cmipl-gsettings-desktop-schemas-3.32.0/share/gsettings-schemas/gsettings-desktop-schemas-3.32.0
/nix/store/k01336mgicd7y0vsqcm590iisk0cmipl-gsettings-desktop-schemas-3.32.0/share/gsettings-schemas/gsettings-desktop-schemas-3.32.0
/nix/store/k01336mgicd7y0vsqcm590iisk0cmipl-gsettings-desktop-schemas-3.32.0/share/gsettings-schemas/gsettings-desktop-schemas-3.32.0
/nix/store/k01336mgicd7y0vsqcm590iisk0cmipl-gsettings-desktop-schemas-3.32.0/share/gsettings-schemas/gsettings-desktop-schemas-3.32.0
/nix/store/k01336mgicd7y0vsqcm590iisk0cmipl-gsettings-desktop-schemas-3.32.0/share/gsettings-schemas/gsettings-desktop-schemas-3.32.0
/nix/store/k01336mgicd7y0vsqcm590iisk0cmipl-gsettings-desktop-schemas-3.32.0/share/gsettings-schemas/gsettings-desktop-schemas-3.32.0
/nix/store/k01336mgicd7y0vsqcm590iisk0cmipl-gsettings-desktop-schemas-3.32.0/share/gsettings-schemas/gsettings-desktop-schemas-3.32.0
/nix/store/k0wh84idlq3m59b8lrib5jgqgw7c4vl9-kparts-5.61.0-bin/share
/nix/store/k0wh84idlq3m59b8lrib5jgqgw7c4vl9-kparts-5.61.0-bin/share
/nix/store/kciz9fg3fq7xf5bf2n92ffgi5ps3zb4f-knotifications-5.61.0-bin/share
/nix/store/kciz9fg3fq7xf5bf2n92ffgi5ps3zb4f-knotifications-5.61.0-bin/share
/nix/store/l6ghiiazchcnyjdw8al812sdapijchjv-bison-3.4.2/share
/nix/store/l6ghiiazchcnyjdw8al812sdapijchjv-bison-3.4.2/share
/nix/store/m640fs0gva5pjszzivhawk1h1zh77g3b-kwallet-5.61.0/share
/nix/store/m640fs0gva5pjszzivhawk1h1zh77g3b-kwallet-5.61.0/share
/nix/store/miifz0x1bkl5s7cnylk1gjjhbwwlp81i-kpty-5.61.0/share
/nix/store/miifz0x1bkl5s7cnylk1gjjhbwwlp81i-kpty-5.61.0/share
/nix/store/mx6j2jnbq9drayskjq33987hdcgk4p9w-exo-0.12.8/share
/nix/store/mx6j2jnbq9drayskjq33987hdcgk4p9w-exo-0.12.8/share
/nix/store/mx6j2jnbq9drayskjq33987hdcgk4p9w-exo-0.12.8/share
/nix/store/mx6j2jnbq9drayskjq33987hdcgk4p9w-exo-0.12.8/share
/nix/store/q3qwahj6by8k3856ccsxyhx834rpi31i-kwallet-5.61.0-bin/share
/nix/store/q3qwahj6by8k3856ccsxyhx834rpi31i-kwallet-5.61.0-bin/share
/nix/store/r4zhq97mwy46am7ij7kcr9frf3av8rzd-kcoreaddons-5.61.0-bin/share
/nix/store/r4zhq97mwy46am7ij7kcr9frf3av8rzd-kcoreaddons-5.61.0-bin/share
/nix/store/rcbjy8szqs3b2hsqi4k5ad8s4lhhasb7-solid-5.61.0/share
/nix/store/rcbjy8szqs3b2hsqi4k5ad8s4lhhasb7-solid-5.61.0/share
/nix/store/s2kqhxr2r5xa3afiywva1187227pmv2g-systemd-243/share
/nix/store/s2kqhxr2r5xa3afiywva1187227pmv2g-systemd-243/share
/nix/store/v5d4966ahvfir2hwpv003022f3pb7vik-gettext-0.19.8.1/share
/nix/store/v5d4966ahvfir2hwpv003022f3pb7vik-gettext-0.19.8.1/share
/nix/store/vgnqma5lhciki8yb290sb7zf1359zvqr-kunitconversion-5.61.0/share
/nix/store/vgnqma5lhciki8yb290sb7zf1359zvqr-kunitconversion-5.61.0/share
/nix/store/whf8fyrk08k55bxsjys5ps6azi9ngmn3-kdbusaddons-5.61.0/share
/nix/store/whf8fyrk08k55bxsjys5ps6azi9ngmn3-kdbusaddons-5.61.0/share
/nix/store/xwj4aqsmkcvqv0k95hb3d442gl2laa2n-kio-5.61.0/share
/nix/store/xwj4aqsmkcvqv0k95hb3d442gl2laa2n-kio-5.61.0/share
/nix/store/z6ds18p02nnbvx4p2nnpff2kh3kyj0c1-xfce4-session-4.14.0/share
/nix/store/z6ds18p02nnbvx4p2nnpff2kh3kyj0c1-xfce4-session-4.14.0/share
/nix/store/zq4wvlvp30qprax8l2bc743jg1g0w06p-kdelibs4support-5.61.0/share
/nix/store/zq4wvlvp30qprax8l2bc743jg1g0w06p-kdelibs4support-5.61.0/share
/nix/store/zz8jw4rb48ham7sm5nm36mfkll3fids7-sonnet-5.61.0/share
/nix/store/zz8jw4rb48ham7sm5nm36mfkll3fids7-sonnet-5.61.0/share
/nix/var/nix/profiles/default/share
/run/current-system/sw/share

@ivan
Copy link
Member Author

ivan commented Nov 8, 2019

Oh, I see the problem, I was using konsole to start another konsole, and XDG_DATA_DIRS becomes longer each time.

I am now using this workaround in ~/.zshrc to remove duplicate entries and keep konsole down to 31533 stats for icon files:

# Remove duplicate entries from XDG_DATA_DIRS to work around
# https://github.com/NixOS/nixpkgs/issues/67691
export XDG_DATA_DIRS=$(echo $XDG_DATA_DIRS | tr ':' '\n' | sort -u | tr '\n' ':' | sed -r 's/(^:|:$)//g')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 1.severity: blocker This is preventing another PR or issue from being completed 6.topic: qt/kde
Projects
None yet
Development

No branches or pull requests

6 participants