Skip to content

Conversation

@stefanhaller
Copy link
Collaborator

Draw only the visible lines of the reflogs panel, like we do for commits.

Since the reflog can get very long, this saves some memory but especially some UI thread lag. In one of my repos I had over 11'000 reflog entries (I guess I should prune them more regularly...), and rendering them took ~600ms; since this happens on the UI thread, there was an annoying stall for half a second after every background fetch, for example (even if the reflog panel is not visible).

@codacy-production
Copy link

codacy-production bot commented Dec 22, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for e1a83271 76.92%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (e1a8327) Report Missing Report Missing Report Missing
Head commit (84be082) 59375 51671 87.02%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#5135) 26 20 76.92%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

@stefanhaller stefanhaller force-pushed the speed-up-rendering-reflog-commits branch from 293846b to c6aae9b Compare December 22, 2025 17:03
@stefanhaller stefanhaller force-pushed the dont-scroll-selection-into-view-on-refresh branch from 0956418 to ce0a1ce Compare December 22, 2025 17:11
@stefanhaller stefanhaller force-pushed the speed-up-rendering-reflog-commits branch from c6aae9b to 909e831 Compare December 22, 2025 17:11
@stefanhaller stefanhaller force-pushed the dont-scroll-selection-into-view-on-refresh branch from ce0a1ce to 30a2cc3 Compare December 23, 2025 10:28
@stefanhaller stefanhaller force-pushed the speed-up-rendering-reflog-commits branch from 909e831 to 93eab94 Compare December 23, 2025 10:28
@stefanhaller stefanhaller force-pushed the dont-scroll-selection-into-view-on-refresh branch from 30a2cc3 to a01c9a9 Compare December 23, 2025 14:11
@stefanhaller stefanhaller force-pushed the speed-up-rendering-reflog-commits branch from 93eab94 to c2aef7d Compare December 23, 2025 14:11
@stefanhaller stefanhaller force-pushed the dont-scroll-selection-into-view-on-refresh branch from a01c9a9 to 478d51c Compare December 23, 2025 14:34
Base automatically changed from dont-scroll-selection-into-view-on-refresh to master December 23, 2025 14:37
@stefanhaller stefanhaller force-pushed the speed-up-rendering-reflog-commits branch from c2aef7d to baa936b Compare December 23, 2025 14:47
Move SetContentLineCount into OverwriteLinesAndClearEverythingElse. Calling it
separately beforehand is not concurrency safe; we need both to happen
when the view's writeMutex is locked.
This fixes a bug in ListContextTrait.FocusLine whereby the view would go blank
when scrolling by page (using ',' or '.') in views that have
renderOnlyVisibleLines set to true but refreshViewportOnChange set to false.
Currently we don't have any such views; the only ones who use
renderOnlyVisibleLines are commits and subcommits, and they also use
refreshViewportOnChange. However, we are going to add one in the next commit,
and eventually it might be a good idea to convert all our list views to that by
default, and get rid of the renderOnlyVisibleLines flag.
Since the reflog can get very long, this saves some memory but especially some
UI thread lag. In one of my repos I had over 11'000 reflog entries (I guess I
should prune them more regularly...), and rendering them took ~600ms; since this
happens on the UI thread, there was an annoying stall for half a second after
every background fetch, for example.
@stefanhaller stefanhaller force-pushed the speed-up-rendering-reflog-commits branch from baa936b to 84be082 Compare December 23, 2025 15:21
@stefanhaller stefanhaller merged commit 32207d2 into master Dec 23, 2025
13 checks passed
@stefanhaller stefanhaller deleted the speed-up-rendering-reflog-commits branch December 23, 2025 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants