mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 19:02:00 +00:00
perf(l2): long lists build only the rows on screen
New message, Nodes (and its Scan popup), Admin and Messages show their items through one virtual list: a screenful of rows, handed to the next item as one scrolls out, the scroll extent from the items' heights. 256 contacts: 522 objects and ~950 ms of filling in (frames up to 96 ms) before, 19 objects at once now; a scrolled frame 28.5 -> 11.7 ms. Nodes 257 -> 49 objects. A new message rewrites Messages' rows in place (46 -> 20 ms) instead of building the screen again; it's rebuilt only when "Read all" comes or goes. A held row keeps what it shows until let go. Perf tools: -D PERF_LISTS, -D PERF_LIST_MUL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -41,8 +41,10 @@ static void onChanDropdown(lv_event_t* e) {
|
||||
choiceSelected((lv_obj_t*)lv_event_get_target(e)));
|
||||
}
|
||||
static void onChanRowHold(lv_event_t* e) {
|
||||
intptr_t i = vlist::arg(e);
|
||||
if (i < 0) return;
|
||||
lv_indev_wait_release(lv_indev_active()); // the hold isn't also a tap that opens the channel
|
||||
s_ui->channelMenu((int)(uintptr_t)lv_event_get_user_data(e));
|
||||
s_ui->channelMenu((int)i);
|
||||
}
|
||||
static void onChanThreadMenu(lv_event_t* e) { (void)e; s_ui->channelMenu(-1); }
|
||||
static void onChanAdd(lv_event_t* e) { (void)e; s_ui->showChannelEdit(-1); }
|
||||
|
||||
Reference in New Issue
Block a user