Repository navigation
Conversation
Listings, folder counts, previews and descriptions all ran on the global thread pool. Counting huge or slow subfolders could occupy every thread and queue the listing of a folder just opened behind them, so clicks seemed to do nothing until a few retries overtook the stuck work. Listings now run on a dedicated pool, and folder counts on a small separate one. Backend::showItem was missing Q_INVOKABLE, so clicking a file in the columns view threw "Property 'showItem' ... is not a function". Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
[Medium impact] The changes affect folder loading and file selection in Folio. The PR appears safe to merge, with a non-blocking fix needed for the cancellation test. Findings
SummarySeparates folder reads from background counts and makes
|
| countFolders(generation); | ||
| }); | ||
| watcher->setFuture(QtConcurrent::run([path, showHidden, sort, query, items, latest, generation, locale] { | ||
| watcher->setFuture(QtConcurrent::run(&listingPool(), [path, showHidden, sort, query, items, latest, generation, locale] { |
There was a problem hiding this comment.
Cancellation test controls wrong pool
folderModelStopsReadingWhatsBeenOvertaken still limits the global pool to one thread, but listings now use listingPool() with eight threads. The next listing can finish on another thread even if the old read never stops, so the test no longer checks cancellation. Update the test to constrain the pool that actually runs listings, or check cancellation directly.
Problem
Sometimes clicking a folder shows nothing, and the contents only appear after several more clicks (seen in large trees such as ~/Projects).
Folder listings, folder counts, previews and descriptions all ran on the global thread pool. Counting huge or slow subfolders can occupy every thread and queue the listing of the folder just opened behind them. Further clicks bump the generation and overtake the stuck work, which is why retrying eventually works.
Changes
foldermodel.cpp.Backend::showItemwas missingQ_INVOKABLE, so clicking a file in the columns view loggedFolderColumns.qml:222: Property 'showItem' of object Backend is not a function.Testing
🤖 Generated with Claude Code