mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-04-26 21:25:13 +00:00
03cfd114da
s.packets and s.byPayloadType[t] were prepended on every new packet to maintain newest-first order, copying the entire slice each time. With 2-3M packets in memory this meant ~24MB of pointer copies per ingest cycle, causing sustained high CPU and GC pressure. Fix: store both slices oldest-first (append to tail). Load() SQL changed to ASC ordering. QueryPackets DESC pagination now reads from the tail in O(page_size) with no sort; GetChannelMessages switches from reverse-iteration to forward-iteration. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>