Repository navigation
Precompile QML with qmlcachegen, cancel thumbnail helpers, and stream folder counts - #219
Merged
Merged
Conversation
- Precompile QML and JS into folio_core with qmlcachegen via qt_add_qml_module, keeping optional PdfPreview/MediaPreview as uncompiled resources and initializing qmlcache_folio_core in Windows and Previewer. - Run fast disk-cache thumbnail probes on a dedicated 2-thread cache pool so ready thumbnails and cached previews never stall behind busy generators, and kill in-flight thumbnailer/pdftoppm process groups when requests are cancelled (without writing bogus failure markers). - Count subfolders in two streaming passes (<=1024 entries first in batches, then large folders) so one huge directory never blocks sibling counts, and batch-insert the initial search result chunk.
[Medium impact] The PR appears safe to merge; the previous failed-launch delay is fixed. SummaryThis PR precompiles QML, separates cached thumbnail reads from generation, cancels running helpers, and streams folder counts.
Reviews (2) · Last reviewed commit: "Return immediately when a thumbnail help..." · Reviewed by Greptile |
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.
Summary
qmlcachegen): Compile Folio's QML and JS intofolio_coreviaqt_add_qml_module(folio_core URI FolioUI ...), leaving optionalPdfPreview.qmlandMediaPreview.qmlas uncompiled resources so builds withoutqt6-webenginestill succeed, and initializeqmlcache_folio_corefromWindowsandPreviewer.<size>/...),cached/previews, and warmsharp/previews on a dedicated 2-thread cache pool so ready thumbnails never block behind running video/PDF/RAW generators. Poll cancellation in 50 ms slices inside external helper runs (runThumbnailer/pdftoppm), kill the helper's process group immediately when cancelled, and never record failure markers for cancelled work.node_modules) never holds back sibling counts, then finish and emit large folders individually. Batch-insert the initial search chunk inFolderModel::insertFound().Benchmarks
Measured on Arch Linux (Qt 6.12, Release build, offscreen platform):
v0.7.2)Windows()QML compile (empty cache)PreviewWindow.qmlcompile (empty cache)countFolders()— first batch & 30 small siblings (with two 60k-file folders ahead)