-
Notifications
You must be signed in to change notification settings - Fork 0
More list performance enhancements #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 also includes consolidating some common pad code.