Skip to content

Commit

Permalink
Vastly improve scrolling performance by adding a 50 ms debounce
Browse files Browse the repository at this point in the history
  • Loading branch information
phil294 committed Oct 13, 2024
1 parent 559feb4 commit 25769b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/src/views/MainView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,8 @@ let scroll_item_offset = 0
function commits_scroller_updated(/** @type {number} */ start_index, /** @type {number} */ end_index) {
scroll_item_offset = start_index
let commits_start_index = scroll_item_offset < 3 ? 0 : scroll_item_offset
visible_commits.value = filtered_commits.value.slice(commits_start_index, end_index)
debounce(() =>
visible_commits.value = filtered_commits.value.slice(commits_start_index, end_index), 50)
}
function scroller_on_wheel(/** @type {WheelEvent} */ event) {
if (store.config.value['disable-scroll-snapping'])
Expand Down

0 comments on commit 25769b7

Please sign in to comment.