Repository navigation
v2.7.18 | LUI v0.2
Pre-release
Pre-release
Optimize node list rendering with simplified paging and longer cache TTL
-
Introduce rawCount variable to track nodeDB size separately from filtered list
size (totalEntries), eliminating naming ambiguity and potential bugs -
Add locationScreen state tracking to infinite scroll logic, ensuring scroll
viewport resets when switching between modes (Last Heard vs Distance/Bearings) -
Remove complex infinite scroll infrastructure in favor of simple direct paging:
- Replace infiniteScroll_updateViewport() with direct calculation
- Remove infiniteScroll_topNum/bottomNum/resetState/updateRunning tracking
- Eliminate cachedDrawList intermediate buffer
- Render directly from cached filtered list using startIndex/endIndex math
-
Simplify render loop: calculate page slice once, iterate directly through
allNodesList subset without additional buffering or state management -
Increase cache TTL from 2000ms to 5000ms for better efficiency on T-Deck:
- Reduces per-frame cache invalidation checks and allocations
- Still catches position/status updates within reasonable window
- Trade-off: distance/bearing updates appear within 5s instead of 2s
Benefits:
- Fewer CPU cycles per frame (no complex viewport math)
- Reduced memory churn (no intermediate drawList allocations)
- Cleaner, more maintainable code with fewer state variables
- Better performance on resource-constrained ESP32 devices