Update TODO.md with JS reverse index optimization note

This commit is contained in:
Graham McIntire 2026-02-20 08:55:28 -06:00
parent b4bbfda620
commit 6c8df98fdd
No known key found for this signature in database

View file

@ -25,3 +25,10 @@ time-bounded queries. This is a significant migration effort.
Changed `:aprsme` from `write_concurrency` to `read_concurrency`. The only write is
`:message_number` increment. If message throughput increases significantly, consider using
`:atomics` or `:counters` instead of ETS for the message counter.
## JS callsign→markerID reverse index
The `new_packets` handler still scans all `markerStates` when converting old markers to
historical dots. The server now sends `convert_to_historical` callsign keys which narrows
the search, but the scan is O(markerStates) in the worst case. A `Map<callsign, Set<markerId>>`
reverse index maintained by `addMarker`/`removeMarker` would make this O(1).