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
-0.01% 73.91%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (ce0a1ce) 59359 51658 87.03%
Head commit (909e831) 59372 (+13) 51661 (+3) 87.01% (-0.01%)

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) 23 17 73.91%

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

@stefanhaller stefanhaller force-pushed the speed-up-rendering-reflog-commits branch from 293846b to c6aae9b Compare December 22, 2025 17:03
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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants