From a60ec376d7a5ecd8c370532e20058c86a7d3b47c Mon Sep 17 00:00:00 2001 From: Jakub <106778416+MarekZegare4@users.noreply.github.com> Date: Sat, 16 May 2026 23:42:52 +0200 Subject: [PATCH] perf: increase render interval on static screens from 300ms to 2000ms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Static screens (SettingsScreen, BotScreen, FullscreenMsgView, message list, contact picker) were re-rendering every 300ms with no visible benefit. New messages still trigger immediate refresh via newMsg() → _next_refresh=100, so responsiveness is unchanged. Reduces unnecessary SPI transfers and CPU wakeups ~6x on idle static screens. Co-Authored-By: Claude Sonnet 4.6 --- examples/companion_radio/ui-new/BotScreen.h | 2 +- examples/companion_radio/ui-new/FullscreenMsgView.h | 2 +- examples/companion_radio/ui-new/UITask.cpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/companion_radio/ui-new/BotScreen.h b/examples/companion_radio/ui-new/BotScreen.h index 5a333af6..cf0b0ec8 100644 --- a/examples/companion_radio/ui-new/BotScreen.h +++ b/examples/companion_radio/ui-new/BotScreen.h @@ -97,7 +97,7 @@ public: } display.setColor(DisplayDriver::LIGHT); } - return 300; + return 2000; } bool handleInput(char c) override { diff --git a/examples/companion_radio/ui-new/FullscreenMsgView.h b/examples/companion_radio/ui-new/FullscreenMsgView.h index 99b3317c..a5bfe99f 100644 --- a/examples/companion_radio/ui-new/FullscreenMsgView.h +++ b/examples/companion_radio/ui-new/FullscreenMsgView.h @@ -81,7 +81,7 @@ struct FullscreenMsgView { display.setCursor(display.width() - 6, 56); display.print(">"); } - return 300; + return 2000; } Result handleInput(char c) { diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index c3316809..ed17df45 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -478,7 +478,7 @@ public: display.print("v"); } - return 300; + return 2000; } bool handleInput(char c) override { @@ -1293,7 +1293,7 @@ public: _hist_sel < fs_hist_count - 1, _hist_sel > 0); } - return 300; + return 2000; } ChannelDetails ch; @@ -1421,7 +1421,7 @@ public: display.setColor(DisplayDriver::LIGHT); renderScrollHints(display, _msg_scroll, total_msg_items); } - return 300; + return 2000; } bool handleInput(char c) override {