mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-05-24 22:25:18 +00:00
42afbb1398
Replace SQLite-backed handlers for /api/channels, /api/channels/:hash/messages, /api/analytics/rf, and /api/analytics/channels with in-memory PacketStore queries. Before (SQLite via packets_v VIEW on 1.2M rows): /api/channels 7.2s /api/channels/:hash/msgs 8.2s /api/analytics/rf 4.2s After (in-memory scan of ~50K transmissions): Target: all under 100ms Three new PacketStore methods: - GetChannels(region) — filters payload_type 5 + decoded type CHAN - GetChannelMessages(hash, limit, offset) — deduplicates by sender+hash - GetAnalyticsRF(region) — full RF stats with histograms, scatter, per-type SNR All handlers fall back to DB queries when store is nil (test compat). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>