Repository navigation
Conversation
Red: nodeHashes keeps 25.8MB for 500k (node, packet) pairs, keyed by the packets' hash strings. newNodeSets and nodeHasTx wrap today's map. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KaR4xu8gVykQBkH8yG8m6H
nodeHashes is the set behind byNode's de-dup: for every node, the transmissions already listed under it. It was keyed by each transmission's 16-character hash string: ~650k entries and 21.5MB on a busy week. It is now keyed by transmission ID, the same membership (a store holds one transmission per hash); eviction deletes by ID, and the health region filter matches regional observations by transmission ID. nodeHasTx reads the set for callers and tests. On a copy of that week: the sets' live heap 21.5MB -> 13.2MB. Fixture (500k pairs): 25.8MB -> 18.0MB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KaR4xu8gVykQBkH8yG8m6H
A13xB0
force-pushed
the
perf/node-sets-by-id
branch
from
October 13, 2026 03:26
4bb926b to
fcc7451
Compare
Owner
Author
|
Rebased onto upstream master and submitted as Kpa-clawbot#2199. |
…ard there Observation IDs differ from transmission IDs in the fixture, so a filter keyed by the wrong ID returns nothing and fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KaR4xu8gVykQBkH8yG8m6H
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KaR4xu8gVykQBkH8yG8m6H
Owner
Author
|
Merged upstream as Kpa-clawbot#2199; closing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
nodeHashesis the set behindbyNode's de-dup: for every node, the transmissions already listed under it. It was keyed by each transmission's 16-character hash string. On a week of a busy network that's about 650k entries and 21.5 MB, four times the size ofbyNodeitself.Change
newNodeSetsandnodeHasTxwrap the map for callers and tests.Measured
Tests
TestNodeSetRetainedHeap: red commit first.TestAddToByNodeDedup.go test ./cmd/serverpasses.No config or UI changes.
🤖 Generated with Claude Code
https://claude.ai/code/session_01KaR4xu8gVykQBkH8yG8m6H