Skip to content

Scan app icon directories once at shell startup - #15167

Merged
dhh merged 1 commit into
quattrofrom
perf/icon-index-single-pass
Oct 12, 2026
Merged

dhh merged 1 commit into
quattrofrom
perf/icon-index-single-pass

Conversation

@dhh

@dhh dhh commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

The application icon fallback index scans every icon tree twice at shell startup and whenever applications change: once for SVGs, then again for PNGs. Scan each tree once and stream SVGs immediately, buffering PNGs until the end to preserve the existing format and directory preference.

Across 25 runs in a disposable VM booted using omarchy-iso/test/vm-image/vm-boot from the verified 2026.10.12.442 edge image, median indexing time fell from 51.7 ms to 32.4 ms. All 7,201 output paths were byte-for-byte identical. On the host, 20 runs fell from 72.8 ms to 44.5 ms. These measure indexing, not total boot time.

Validation: real-tree regression fixtures cover SVG/PNG precedence, XDG directory priority, PNG-only duplicates, device icons, excluded action icons, filenames with spaces and exactly one traversal per root. Existing app-search tests pass. The installed shell restarts, answers IPC and opens the menu in the VM. Claude found no actionable issues; its suggested PNG-only ordering fixture was added.

This PR is to remain unmerged. Greptile feedback will be addressed as it arrives.

@greptile-apps

greptile-apps Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

The PR scans each icon directory once instead of separately scanning for SVGs and PNGs.

  • Icon indexing scans each root once and keeps SVGs first.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Icon directories and pixmaps] --> B[One find call per root]
  B --> C{Path ends in .svg?}
  C -->|Yes| D[Emit SVG path]
  C -->|No| E[Buffer PNG path]
  E --> F[Emit PNG paths after input ends]
  D --> G[Keep first path per icon name]
  F --> G
  G --> H[Publish index when scan exits]
Loading

Reviews (1) · Last reviewed commit: "Scan app icon directories once per index..." · Reviewed by Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants