Conversation
frasergr
force-pushed
the
perf/async-dirsize
branch
from
September 14, 2026 17:29
a5028af to
ccedebe
Compare
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.
Problem
Recursive directory sizes currently run inline on Flea's backend request loop. A large folder can therefore delay navigation, window refreshes, and clicks on another sort column for up to the walk's two-second deadline.
Size sorting also stops at a provisional order: files use exact metadata sizes, but folders remain in name order after their recursive sizes arrive.
Fix
list,sort,window, cancellation, and shutdown remain responsive.partiallower-bound behavior.dirsortedafter that reorder; the QML client clears row-indexed state, resets to row zero, requests the final window, and refills visible sizes from cache.Behavior preserved
Validation
git diff --checkpassed.Relationship to upstream PR thisisgm#118
Upstream PR #118 solves the same primary responsiveness bug with a smaller persistent-worker implementation. It covers off-loop traversal, cooperative cancellation, stale-result rejection, and shutdown behavior.
This branch adds behavior thisisgm#118 does not currently implement:
dirsortedtells the client that row indices changed;If thisisgm#118 merges first, the minimal upstream path is to keep its worker and port only those exact-order/client-refresh pieces rather than merge both worker implementations.
Related but outside this PR: #144 is the same event-loop blocking class in synchronous MTP/GVFS
scan(), notdirsize.