Repository navigation
Performance
-
keep
dua cleanresponsive with many candidates
Every finished candidate forced a redraw, and every redraw, keypress and
tree_view()call rebuilt all hub rows. Total work grew quadratically with
the number of candidates, so scans slowed down over time and starved input.Throttle candidate publishing like other traversal updates. Rebuild hub rows
only where published candidates change, and lettree_view()reuse the last
rows for scoping. Group rows with hash lookups instead of ordered path
comparisons, keeping size-then-path order.On a 212 GB tree with about 12,500 candidates (macOS, 8 threads), the
interactive scan took over 10 minutes and was stopped at about half its
rows; it now takes 41 s, the same as draining its events without a UI.
After the scan, a hub rebuild fell from 69 ms to 28 ms and now runs only
when candidates change; a keypress fell from 168 ms to 15 ms. -
mark many entries without quadratic totals
Recalculating marked totals compared every marked path with every earlier
one, and the hub did that after each member it marked. Marking a group of
267 candidates took 440 ms; marking all of them would not finish.Sorted paths place everything below a directory directly after it, so one
pass that remembers the last counted directory gives the same totals.
MarkPane::toggle_indices()marks many entries and recalculates once,
which the hub now uses for groups and for marking all candidates.Marking that group now takes 3 ms, and marking all 13,600 candidates 35 ms.
-
build only the visible rows of lists
ratatui'sListcollects every item, so each frame formatted and shortened
every row, visible or not. With about 12,500 cleanup candidates a redraw
took 15 ms, and once the marked-items pane narrowed the hub, shortening
every long path made it 40 ms.Compute the visible window with ratatui's scrolling rules for single-line
items and only build the rows inside it. A keypress in the hub now takes
under 1 ms, whether entries are marked or not.
Commit Statistics
- 6 commits contributed to the release.
- 1 day passed between releases.
- 3 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
Commit Details
view details
- Uncategorized
- Merge pull request #443 from robinstark/faster-lists-and-marks (d2eaaca)
- Merge pull request #442 from robinstark/clean-hub-throttle (c239f83)
- Review (2178eeb)
- Keep
dua cleanresponsive with many candidates (6f95522) - Mark many entries without quadratic totals (1b1d1d3)
- Build only the visible rows of lists (139be18)