feat: virtual scrolling for gallery grid view#3170
Open
msedek wants to merge 1 commit intorommapp:masterfrom
Open
feat: virtual scrolling for gallery grid view#3170msedek wants to merge 1 commit intorommapp:masterfrom
msedek wants to merge 1 commit intorommapp:masterfrom
Conversation
Replace v-for over all ROMs with @tanstack/vue-virtual window virtualizer. Only visible rows + 5 overscan are rendered in DOM. At 1000 ROMs with 6 columns, only ~60 cards exist in DOM instead of 1000. Dramatically reduces freeze when navigating away. AI-assisted: Claude was used for research and implementation.
zurdi15
requested changes
Mar 26, 2026
Member
zurdi15
left a comment
There was a problem hiding this comment.
Can you fix the Typescript check
Also, is it possible for you to sign the commit? It's OK otherwise
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements row-based virtual scrolling for the gallery card grid using
@tanstack/vue-virtual, addressing the performance issue described in #1426 and #3161.Problem
When browsing a platform with 1000+ ROMs, the infinite scroll keeps appending GameCard components to the DOM. After scrolling 500+ cards (~25,000 DOM nodes), clicking a game freezes the browser as Vue destroys all components at once.
Solution
v-foroverfilteredRomswithuseWindowVirtualizerfrom@tanstack/vue-virtualWhat changed
frontend/src/views/Gallery/Platform.vue— template and scriptfrontend/package.json— added@tanstack/vue-virtualdependencyWhat didn't change
Test plan
Tested with 5,600 ROMs across 12 platforms (largest: NES with 1,366 ROMs).
AI-assisted: Claude was used for research and implementation.
Closes #3161