mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 19:02:00 +00:00
perf(l2): Nodes slides in smoothly, Diagnostics opens in half the time
Rows still to build wait while a screen slides in, so its frames aren't a fill budget apart (Nodes: 12 frames of 24 ms instead of 7 of 33, up to 65). The crash dump in flash is read at boot, not on the first Diagnostics (build 54 -> 20 ms). The perf tools time Nodes too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1310,6 +1310,7 @@ void UITask::begin(DisplayDriver* display_drv, SensorManager* sensors, NodePrefs
|
|||||||
|
|
||||||
buildStatusBar();
|
buildStatusBar();
|
||||||
applyDisplayPrefs(); // a slider percentage overrides the level main.cpp set
|
applyDisplayPrefs(); // a slider percentage overrides the level main.cpp set
|
||||||
|
{ char c[24]; lvport::crashSummary(c, sizeof(c)); } // the dump in flash read now (~45 ms), not on the first Diagnostics
|
||||||
showHome();
|
showHome();
|
||||||
if (pinSet()) lockScreen(); // a reboot doesn't get round the PIN
|
if (pinSet()) lockScreen(); // a reboot doesn't get round the PIN
|
||||||
showSplash(); // over both; fades out by itself
|
showSplash(); // over both; fades out by itself
|
||||||
@@ -1756,7 +1757,7 @@ void UITask::loop() {
|
|||||||
if (lv_obj_get_style_layout(o, LV_PART_MAIN) == LV_LAYOUT_FLEX) ++*(uint32_t*)u;
|
if (lv_obj_get_style_layout(o, LV_PART_MAIN) == LV_LAYOUT_FLEX) ++*(uint32_t*)u;
|
||||||
return LV_OBJ_TREE_WALK_NEXT; }, &nf);
|
return LV_OBJ_TREE_WALK_NEXT; }, &nf);
|
||||||
Serial.printf("PERF flex containers %lu\n", (unsigned long)nf);
|
Serial.printf("PERF flex containers %lu\n", (unsigned long)nf);
|
||||||
if ((!fn && (page == 7 || page == 1)) || fn == &UITask::showContacts) {
|
if ((!fn && (page == 7 || page == 1)) || fn == &UITask::showContacts || fn == &UITask::showNearby) {
|
||||||
char tag[12]; snprintf(tag, sizeof(tag), "%s%d", fn ? "list" : "page", page);
|
char tag[12]; snprintf(tag, sizeof(tag), "%s%d", fn ? "list" : "page", page);
|
||||||
fillFlush(); // the whole page, not only its first section
|
fillFlush(); // the whole page, not only its first section
|
||||||
perfDrawProfile(tag);
|
perfDrawProfile(tag);
|
||||||
@@ -1777,6 +1778,7 @@ void UITask::loop() {
|
|||||||
one("admin", 0, &UITask::showAdminPick);
|
one("admin", 0, &UITask::showAdminPick);
|
||||||
one("contacts", 0, &UITask::showContacts);
|
one("contacts", 0, &UITask::showContacts);
|
||||||
one("chats", 0, &UITask::showChats);
|
one("chats", 0, &UITask::showChats);
|
||||||
|
one("nearby", 0, &UITask::showNearby);
|
||||||
#ifdef PERF_CONTROLS
|
#ifdef PERF_CONTROLS
|
||||||
{ // -D PERF_CONTROLS: every control on the settings screens used once (perfControls)
|
{ // -D PERF_CONTROLS: every control on the settings screens used once (perfControls)
|
||||||
auto ctls = [this](const char* tag, int page, void (UITask::*fn)()) {
|
auto ctls = [this](const char* tag, int page, void (UITask::*fn)()) {
|
||||||
@@ -2501,6 +2503,9 @@ void UITask::fillStep() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void UITask::fillTick() {
|
void UITask::fillTick() {
|
||||||
|
// Not while the screen moves in: its frames came a budget apart (Nodes,
|
||||||
|
// 57 rows: 33 ms a frame, up to 65). What it shows first is built already.
|
||||||
|
if (!s_fill_n || (_body && lv_anim_get(_body, NULL)) || lv_display_get_screen_prev(NULL)) return;
|
||||||
uint32_t t0 = micros();
|
uint32_t t0 = micros();
|
||||||
while (s_fill_n) {
|
while (s_fill_n) {
|
||||||
fillStep();
|
fillStep();
|
||||||
|
|||||||
Reference in New Issue
Block a user