mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-08-14 18:10:47 +00:00
Move backfillResolvedPaths from blocking startup to a background goroutine that runs after ListenAndServe. The HTTP server now starts immediately after Load() + index builds (~2 min), regardless of database size. Changes: - New backfillResolvedPathsAsync() processes observations in chunks of 5K with 100ms yields between batches to avoid starving HTTP handlers - Re-picks best observation per-chunk for affected transmissions - Adds backfillComplete atomic flag + progress counters to PacketStore - X-CoreScope-Status response header: 'backfilling' or 'ready' on all API responses via middleware - /api/stats includes backfilling (bool) and backfillProgress (0.0-1.0) - Logs progress: [store] backfill progress: 50000/7100000 observations (0.7%) The original synchronous backfillResolvedPaths is preserved for potential use in tests or one-off scripts.