Skip to content

Optimize GUI#334

Draft
jgauchia wants to merge 17 commits intodevelfrom
devel_features
Draft

Optimize GUI#334
jgauchia wants to merge 17 commits intodevelfrom
devel_features

Conversation

@jgauchia
Copy link
Copy Markdown
Owner

@jgauchia jgauchia commented Apr 3, 2026

No description provided.

jgauchia added 17 commits March 29, 2026 13:10
   - Reduced MapRenderTask stack from 16KB to 8KB (8KB SRAM recovered).
   - Reduced cliTask stack from 12KB to 4KB (8KB SRAM recovered).
   - Rebalanced task affinity: Moved MapRenderTask and cliTask to Core 1.
   - Dedicated Core 0 to real-time I/O (GPS and Sensor tasks) to prevent latency.
   - Adjusted MapRenderTask priority to 2 to ensure UI (Prio 3) responsiveness.
   - Improved gpsTask loop by replacing portMAX_DELAY with a 100ms timeout.
   - Validated stack High Water Marks across all targets post-refactor.
…imization

 - Migrated Notify Bar, Compass, MAP orientation, and NAV widgets to asynchronous reactive updates.
 - Eliminated redundant manual polling timers to improve CPU efficiency.
   - Tune mapRenderTask yield to 40ms/25FPS, doubling continuous draw time.
   - Fix UI desync forcing async redraw on zoom and GPS toggle events.
   - Unroll render passes. Iterate layers once instead of twice, removing redundant pass checks and the intermediate renderNavFeature function.
   - Implement fast Y-axis rejection in renderNavText to skip expensive AABB calculations.
   - Significantly reduce Core 0 CPU load during the text rendering pass on dense urban tiles.
   - Improve final perceived rendering speed of labels.
   - Replace floating-point math with integer arithmetic in darkenRGB565
     to reduce CPU overhead during road casing and polygon outline rendering.
   - Fix inverted Level of Detail (LOD) logic in renderNavLineString:
     Aggressive simplification (3px) is now correctly applied at low zooms (Z<=12)
     and maximum precision (1px) at high zooms (Z>=15).
   - Implement Zero-Allocation: Pre-reserve vector capacities for featurePool,
     layers, and buffers to eliminate costly PSRAM reallocations during rendering.
   - Add Color Caching: Implement a single-entry cache in darkenRGB565 to skip
     redundant integer math for repeated road and polygon outline colors.
   - Yield Tuning: Increase the rendering burst interval from 32 to 128 elements
     to reduce FreeRTOS context-switching overhead on Core 0.
   - Improved overall stability and eliminated CPU micro-stutters during panning.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant