More list performance enhancements#55
Merged
Merged
Conversation
Implements a 3-item LRU cache for thumbnails with direction-aware preloading. When browsing, the next item in the scroll direction is automatically loaded in the background, making sequential navigation feel instant.
There was a problem hiding this comment.
Pull request overview
This pull request implements list performance enhancements through two main improvements: (1) consolidating duplicate input handling code into reusable helper functions (PAD_beginPolling, PAD_handleRepeat, PAD_updateButton), and (2) adding thumbnail and text caching systems to the minui file browser to reduce redundant rendering and I/O operations.
Key Changes:
- Refactored input polling logic across 7+ platform implementations to use shared helper functions, eliminating ~1000 lines of duplicated code
- Added button repeat acceleration (faster scrolling after 1.5 seconds) and thumbnail/text caching with preloading for smoother list navigation
- Updated SDL2_Config structure to explicitly define rotation settings (rotate_cw, rotate_null_center) replacing the removed brightness_alpha field
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| workspace/all/common/pad.c | Implements new helper functions (PAD_beginPolling, PAD_handleRepeat, PAD_updateButton) and button repeat acceleration with hold tracking |
| workspace/all/common/pad.h | Declares new input polling helpers and adds hold_start tracking array plus acceleration timing constants |
| workspace/all/common/api.c | Updates fallback PLAT_pollInput to use new pad helpers instead of duplicated logic |
| workspace/all/common/api.h | Adds pad.h include and updates PAD_Context to include hold_start array |
| workspace/all/common/render_sdl2.c | Updates rotation logic to use new rotate_cw and rotate_null_center config fields |
| workspace/all/common/render_sdl2.h | Refactors SDL2_Config structure with explicit rotation settings, removes brightness_alpha |
| workspace/all/minui/minui.c | Adds thumbnail cache (LRU with preloading) and text cache (round-robin) systems to optimize list rendering performance |
| workspace/zero28/platform/platform.c | Adopts new pad helpers and adds rotation config (90° CW), updates MENU CPU frequency to 800MHz |
| workspace/tg5040/platform/platform.c | Adopts new pad helpers and adds rotation config (no rotation), updates MENU CPU frequency to 800MHz |
| workspace/rgb30/platform/platform.c | Adopts new pad helpers and adds rotation config (no rotation), updates MENU CPU frequency to 800MHz |
| workspace/rg35xxplus/platform/platform.c | Adopts new pad helpers and adds rotation config (270° CCW), eliminates ~150 lines of duplicate input code |
| workspace/my355/platform/platform.c | Adopts new pad helpers and adds rotation config (270° CCW), updates MENU CPU frequency to 800MHz |
| workspace/my282/platform/platform.c | Adopts new pad helpers and adds rotation config (270° CCW) |
| workspace/magicmini/platform/platform.c | Adopts new pad helpers, adds rotation config (270° CCW with NULL center), removes duplicate updateButton function |
| workspace/m17/platform/platform.c | Adopts new pad helpers and removes duplicate input handling logic |
| tests/unit/all/common/test_api_pad.c | Adds comprehensive unit tests for all three new pad helper functions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
189798f to
37dcb81
Compare
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.
This also includes consolidating some common pad code.