Skip to content

v2.7.19 | LUI v0.4

Pre-release
Pre-release

Choose a tag to compare

@ItsLimitlezz ItsLimitlezz released this 30 Jan 04:05
· 758 commits to develop since this release

Optimize infinite scroll performance for nodes panel

Major refactoring to eliminate performance bottlenecks during scrolling.
LVGL performance is dominated by object count and update frequency, not visibility.

Key optimizations:

  • Separate scroll event handling: continuous scroll (LV_EVENT_SCROLL) only
    hides/shows nodes, scroll-end (LV_EVENT_SCROLL_END) handles loading
  • Remove all filter/status updates from scroll events - defer until scroll completes
  • Skip updateNodesFiltered() and updateNodesStatus() during scroll
  • Reduce batch load from 20 to 10 nodes per trigger
  • Change buffer strategy from 2-node to 0-node (immediate hide)
  • Single-pass hide/show logic instead of double-loop iteration
  • Early exit at nodesScrollDisplayLimit to avoid processing unloaded nodes

Performance impact:

  • Eliminates repeated lv_obj_has_state() calls during scroll
  • Avoids expensive strcasestr() and style setters during scroll
  • Reduces LVGL object churn from 250 nodes being touched to ~5-6 visible
  • Only ~5 LVGL objects rendered during scroll (hidden nodes don't render)

Trade-off: Filters/colors stale during scroll, update only when user stops.
Acceptable: User perceives smooth scroll, updates apply immediately after.