Repository navigation
Conversation
[Medium impact] The effects are limited to the folder-list browsing workflow. The PR appears safe to merge, with a non-blocking gap in thumbnail test coverage. Findings
SummaryEnables row reuse in
Known behavior acknowledged by
|
|
|
||
| ListFixture() { | ||
| QDir().mkpath(folder()); | ||
| for (int i = 0; i < 400; ++i) writeFile(folder() + QString("/file%1.txt").arg(i, 3, 10, QChar('0'))); |
There was a problem hiding this comment.
All fixtures are text files, so these tests never exercise the changed thumbnail binding. The suite can pass even if pooled rows keep thumbnails or reused rows show the wrong picture. Add an image fixture, check that pooling clears its thumbnail source, then reuse that row for another image and a text file.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
Reuse
FolderListdelegates during scrolling, rather than rebuilding the same row components for each newly visible file.Pooled rows release their thumbnail source and stop handling input. A late drag-image callback is accepted only for the current request and path. While a drag is active, the list uses its existing non-reusing behavior, so the source cannot be recycled into another file. Grid and column views do not enable reuse; timers and
cacheBufferare unchanged.Evidence
After: 42 rows constructed and 35 ms of GUI-thread CPU. With alternating synthetic PNG/text files, GUI CPU fell from 242 to 76 ms and all-thread CPU from 386 to 217 ms. Five interleaved measured pairs per scenario, after discarded warm-ups, Qt 6.12 Release/offscreen software rendering on the same machine. These measure cumulative scroll work, not FPS; first display after model preload and peak live row count were approximately unchanged.
rowreuse_teststarget: state cleanup in LTR/RTL, different-file clicks within the double-click interval, release after scrolling, drag/reuse restoration, delayed grabs across A→B→A, and window destruction. The double-click case caught and prevented a pilot regression: a click on a reused row could otherwise activate the new file immediately.folio_tests196 passed,rowreuse_tests9 passed; the new target also passed 10 consecutive runs.FileOps, and a subsequent Escape cancels without moving the next file. Passed in LTR/RTL. Destruction of an unselected drag source during a large jump cancels the drag on both main and this branch; this change does not pin the source.Merge Danger
Door: Two-way. No stored data or format changes.
Blast Radius: List.
FileRowis also used by column views, which were smoke-tested in LTR/RTL with enter/back navigation. This targets main independently; overlapping pending thumbnail/column changes will need a fresh check when combined.