perf(l2): UI_PERF_TEST draw profiles and layout counters

Kept for the optimisation pass before a release:
- perfDrawProfile(): a full redraw timed per object (its own drawing),
  totals by kind and the costliest listed -- on settings pages, Contacts,
  Home, the map and under a frozen popup; the screen's entrance frames too.
- Per screen: build, layout, first draw and redraw apart.
- A popup over Home: a full frame dimmed live and frozen.
- The reset reason and a core dump summary at start.
- -D PERF_WRAP_TEXT with -Wl,--wrap= of lv_text_get_size_attributes,
  lv_layout_apply, lv_obj_get_style_prop_internal and lv_obj_send_event:
  text measured, flex runs, style reads and events per screen.
- -D PERF_KEEP_USB leaves the USB popup up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-09-30 14:33:32 +02:00
co-authored by Claude Opus 5.5
parent f70019f920
commit 31cbb1a91a
2 changed files with 198 additions and 2 deletions
@@ -307,6 +307,7 @@ void UITask::perfMap(bool reset) {
fl0 = lvport::s_flush_us; t = micros();
for (int i = 0; i < 10; i++) { lv_obj_invalidate(lv_screen_active()); lv_refr_now(NULL); }
Serial.printf("PERF map full redraw %5.1f ms, flush %5.1f ms\n", (micros() - t) / 10000.0f, (lvport::s_flush_us - fl0) / 10000.0f);
perfDrawProfile("map");
s_perf_tile_us = s_perf_tile_max = s_perf_tile_n = 0;
}
#endif