perf(#306): time startup loads and frame handlers to locate the UI stalls
Two reported freezes: one shortly after connect, one during channel sync, with the sync progress bar never repainting and then completing all at once. That is the UI isolate being blocked, and the log already shows the signature - a long silence followed by many frames sharing one timestamp, which is queued input flushing after the loop frees up. The previous fix (batching 600 per-contact notifications) moved the stall from 43.6s to 40.1s, which is noise. It was the wrong culprit, so this replaces guessing with measurement: - The post-SELF_INFO cache load is split into named steps, each timed and logged as `startup-load <step> took Nms`. The step order is unchanged, and cachedChannels still runs before channelMessages so PSK-keyed history resolves. - Every RX frame handler is timed, and any that occupies the isolate for more than 100ms logs `slow frame handler: code=N blocked UI for Nms`. This names the handler wherever it is, rather than requiring a guess about which one. No behaviour change. Diagnostics only, kept as Perf-tagged logging because this class of stall is worth catching again. flutter analyze clean, dart format clean, 469 tests pass.integration/290-306-335
parent
7f9f6ba63b
commit
bd8779697a
Loading…
Reference in new issue