Repository navigation
Optimize previews, details pane, and thumbnail loading - #218
Merged
Merged
Conversation
[Medium impact] The PR appears safe to merge; all three previous findings are fixed, and no new actionable issues were found. SummarySpeeds up previews by caching app and file-type lookups, reducing repeated settings reads, and moving more work away from the window's thread.
|
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes UI-thread stalls when stepping through files in Columns view, speeds up thumbnail generation and delivery, and makes
folio previewmore responsive in large folders.Changes
src/fileops.h,src/fileops.cpp,src/PreviewPane.qml):omarchy-launch-editor.desktopname resolution (which previously calledg_app_info_get_all()twice per keypress on text/code files),defaultAppName(mime), andappsFor()results, keyed by editor/mimeapps/applications mtimes and invalidated immediately onsetDefaultApp().pane.typefromPreviewPane.qmlintoFileOps::appsFor(path, mime)so stepping through files in Columns view does not open files on the UI thread to sniff MIME types.src/backend.cpp):Backend::sortFor()withstat()invalidation instead of reopening and parsingfolio.confon every column or navigation.statx()call inBackend::describe(), and cacheBackend::typeName()per(locale, mime).src/thumbnails.h,src/thumbnails.cpp):.thumbnailerdirectory scanning andQMimeDatabasesetup viastd::call_onceto the first thumbnailer lookup (off the UI thread).finished()inThumbnailProviderbefore writing newly generated PNG cache entries and failure markers (matchingsharp), and prioritizecached/andsharp/preview requests over grid/row thumbnail backlogs.withPlainText()(single pre-sized output buffer usingQByteArrayView),textPage()(stop line iteration at the page bottom), cachepdftoppmlookup, skip redundantmkpath/setPermissionscalls, and computecacheKey()once per lookup.src/previewer.h,src/previewer.cpp):QImageReader::supportedMimeTypes()inPreviewer::viewerFor().m_pathIndex) for O(1)Previewer::show().Previewer::relist()onFolderModel::listingPool()with a generation stop predicate so switching folders or closing cancels in-flight listings early.Benchmarks
Measured on Release builds:
Thumbnails()startup init200×Backend::sortFor()20×FileOps::appsFor()+defaultAppName()(text/plain)Thumbnails::load()(2400×1600 JPG, cold)Thumbnails::load()(2400×1600 PNG, cold)Thumbnails::sharp()(2400×1600 JPG, cold)20×Thumbnails::textPage()(256px)