Closed bbhtt closed 7 months ago
os.walk seems to be a bit too slow here...
https://peps.python.org/pep-0471/ this should be faster than os.walk, if you want to refactor it. Don't think it matters but up to you
I changed it to glob, seems fine now as far as I can see.
https://peps.python.org/pep-0471/ this should be faster than os.walk, if you want to refactor it. Don't think it matters but up to you
Looks like os.walk was changed to use scandir internally or something ? https://bugs.python.org/issue23605
Eg. of this happening Kdevelop as of this commit https://github.com/flathub/org.kde.kdevelop/commit/9369b16e4011de25a867c512c27f2319f7b4fde4
Current state of kdevelop
```sh → tree ~/.local/share/flatpak/app/org.kde.kdevelop/current/active/files/share/icons /home/bbhtt/.local/share/flatpak/app/org.kde.kdevelop/current/active/files/share/icons └── hicolor ├── 1024x1024 │ └── apps │ └── kdevelop.png ├── 128x128 │ └── apps │ ├── bazaar.png │ ├── clazy.png │ ├── cmake.png │ ├── cppcheck.png │ ├── kdevelop.png │ └── okteta.png ├── 16x16 │ ├── actions │ │ └── breakpoint.png │ └── apps │ ├── cmake.png │ ├── github-forked.png │ ├── github-private.png │ ├── github-repo.png │ ├── kdevelop.png │ ├── kdevgh.png │ └── okteta.png ├── 22x22 │ ├── actions │ │ └── breakpoint.png │ └── apps │ └── okteta.png ├── 256x256 │ └── apps │ └── kdevelop.png ├── 32x32 │ ├── actions │ │ └── breakpoint.png │ └── apps │ ├── cmake.png │ ├── kdevelop.png │ ├── kdevgh.png │ └── okteta.png ├── 48x48 │ └── apps │ ├── kdevelop.png │ └── okteta.png ├── 512x512 │ └── apps │ └── kdevelop.png ├── 64x64 │ └── apps │ ├── cmake.png │ ├── kdevelop.png │ └── okteta.png ├── icon-theme.cache └── scalable ├── actions │ └── breakpoint.svg └── apps ├── git.svg ├── kdevelop.svg └── qtlogo.svg 26 directories, 34 files ╭─bbhtt@fedora in ~ took 5ms → tree ~/.local/share/flatpak/app/org.kde.kdevelop/current/active/files/share/app-info /home/bbhtt/.local/share/flatpak/app/org.kde.kdevelop/current/active/files/share/app-info ├── icons │ └── flatpak │ ├── 128x128 │ │ └── org.kde.kdevelop.png │ └── 64x64 │ └── org.kde.kdevelop.png └── xmls ├── io.qt.qtwebengine.BaseApp.xml.gz └── org.kde.kdevelop.xml.gz ```