perf(l2): heavy screens build in pieces over several loop passes

The list fill becomes a small job queue (fill/then/fillStart, fillTick with a
25 ms budget per pass). Settings pages build section by section in
schemaRows, with the trailing extras (melodies, prune, quick messages) queued
after them so the order stays; Radio and Repeater build by group, Admin's
repeater pick like the contact list, Diag's Live tab by section. Rebuilds
that restore the scroll flush the queue first. Screens went from 220-360 ms
to 80-175 ms (build + first frame).

Diag's crash line read the core dump in flash every second (~44 ms each);
it is read once now. The perf run times every page and dismisses the USB
popup, which had covered all earlier measurements.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-09-30 08:53:15 +02:00
co-authored by Claude Opus 5.5
parent 34f739c45b
commit 039485bf34
8 changed files with 205 additions and 81 deletions
+13 -1
View File
@@ -323,18 +323,26 @@ private:
void buildChats();
void buildContacts();
void contactRow(int i);
void fillStart(lv_obj_t* list, int n, int first, void (UITask::*row)(int));
void fill(void (UITask::*fn)(int), int from, int to);
void then(void (UITask::*fn)(int), int arg);
void fillStart(int n, int first, void (UITask::*row)(int));
void fillStep();
void fillTick();
void fillFlush();
int fillPending() const;
void buildSettings();
static const int SETTINGS_GROUPS = 5;
void settingsGroup(int i);
void buildSchemaSettings();
void schemaRows(lv_obj_t* body, uint8_t page);
void schemaSection(int i);
void schemaExtras(int page);
void showMapOptions(uint8_t section);
void schemaRow(lv_obj_t* card, int idx);
void buildKeyboardPage(lv_obj_t* body);
void buildAboutPage(lv_obj_t* body);
void buildAdminPick();
void adminPickRow(int i);
void buildOta();
void refreshOta();
void otaTick();
@@ -390,10 +398,13 @@ private:
void buildClock();
void buildRadio();
void rebuildRadio();
void radioGroup(int i);
void buildRadioExtras(lv_obj_t* body);
void buildScopes();
void buildRepeater();
void rebuildRepeater();
void repeaterGroup(int i);
void repeaterRelays();
void buildSoundRows(lv_obj_t* body, bool top);
void buildMelodies();
void buildQuickMsgs();
@@ -415,6 +426,7 @@ private:
void favRefresh();
int unreadTotal(); // DMs, channels and rooms
void buildDiag();
void diagSection(int sec);
void refreshDiag();
void buildCompass();
void refreshCompass();