perf(list): virtualize emoji grid rendering#502
Closed
JustYannicc wants to merge 1 commit into
Closed
Conversation
Collaborator
Author
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.
What changed
Why
The ordinary list path was already virtualized, but the emoji-grid branch rendered every filtered item. Emoji-heavy extensions can produce thousands of cells, making initial render and updates unnecessarily expensive.
Baseline measurement before source edits: a grouped 4,096-item emoji grid rendered 4,096 cells in 26.25 ms.
After measurement: the same list is represented by 514 virtual rows and initially renders 112 cells in 3.12 ms.
Compatibility impact
The public List API and action behavior are unchanged. Section headers, item counts, mouse selection, keyboard selection, context actions, and action execution are preserved. Visual layout uses the same 8-column grid and fixed 96px cells; scroll height is spacer-backed instead of full DOM-backed.
How tested
node --test scripts/test-emoji-grid-virtualization.mjsnode --test scripts/test-*.mjs(1 live Electron test skipped because Electron is not launchable here)node scripts/check-i18n.mjs(exits 0; reports existing Italian missing keys unrelated to this change)node_modules/.bin/vite buildNote:
pnpm test/pnpm run check:i18nare blocked in this local environment by pnpm 11 pre-run install verification failing on ignored dependency build scripts, so I invoked the underlying package script commands directly.