Skip to content

Skip redundant metadata checks when matching regular-file types (superseded by #217) - #215

Closed
k-kostin wants to merge 1 commit into
omacom:mainfrom
k-kostin:codex/skip-redundant-mime-stat
Closed

k-kostin wants to merge 1 commit into
omacom:mainfrom
k-kostin:codex/skip-redundant-mime-stat

Conversation

@k-kostin

@k-kostin k-kostin commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Superseded by #217's native directory listing. Closing after rebasing locally onto f73d8e4 and checking the remaining consumers.

folder listing / search → entryFromStat (#217)
Recents / standalone file preview → entryFor (this proposal)

The original directory-listing improvement was measured on eba4276; it no longer describes the benefit of this patch on current main.

Evidence

  • Twenty alternating process pairs on 200 synthetic regular files, Release Qt 6.12.0: warm listRecent median 1.744 → 1.739 ms. The fresh-QFileInfo helper moved 1.445 → 1.442 ms. No meaningful benefit was established for the remaining production paths; preview-window presentation and cold storage were not measured.
  • Separate libc-call counters, including identical fixture setup: 200 stat64 + 600 statx → 800 statx for fresh metadata and Recents. The two intercepted call types' combined count is unchanged because proving a fresh path is not a symlink needs another lookup.
  • A pre-cached QFileInfo still saves a lookup, but neither remaining production caller supplies that symlink metadata. The original branch and measurements are retained.

Merge Danger

Door: two-way.

Blast Radius: none; closing without integrating the patch.

@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

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

Summary

entryFor now uses Qt's filename overload for regular files that are not symlinks.

  • Folder listings skip an extra metadata check for regular files.

Reviews (1) · Last reviewed commit: "Avoid a redundant stat when matching reg..." · Reviewed by Greptile

@k-kostin k-kostin changed the title Skip redundant metadata checks when matching regular-file types Skip redundant metadata checks when matching regular-file types (superseded by #217) Nov 23, 2026
@k-kostin

Copy link
Copy Markdown
Contributor Author

Rechecked after #217: normal listings and search now bypass this helper. The remaining Recents case moved from 1.744 to 1.739 ms per 200 files, with no reduction in the combined intercepted metadata-call count. Closing this as superseded; the original directory benchmark remains recorded against its old base.

@k-kostin k-kostin closed this Nov 23, 2026
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.

1 participant