Conversation
djwhitt
force-pushed
the
perf/routing-snapshot-cache-followup
branch
2 times, most recently
from
September 8, 2026 20:11
8585b32 to
48c8ab5
Compare
djwhitt
force-pushed
the
perf/routing-snapshot-cache-followup
branch
from
September 8, 2026 20:12
48c8ab5 to
4754419
Compare
7 of 8 tasks
djwhitt
marked this pull request as ready for review
September 8, 2026 21:21
This branch has not been deployed
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.
Review scope
fcb4c9386820c6ee4754419cWhat changes
The tree and ordered target tuple are built from the same sorted rule list. The tree then emits zero-based tuple positions instead of database rule IDs.
No cache lifecycle, batch API, recovery, telemetry, or capacity-policy changes remain in this PR.
Correctness constraints
Incremental effect of this PR
Same corrected fixtures and Linux / 6-core / Elixir 1.19.5 / OTP 27.3.4.6 environment as #3943. These are local microbenchmarks, not production-throughput claims.
One adjacent run per representation:
Sparse results have substantial scheduler/GC variance. An earlier matching-only probe found positional and ID keys within 1%; the dense gains from avoiding map reconstruction are more persuasive than the small sparse differences.
Additional positional effects:
Incremental commands and details:
source_routing_followup_results.md.Cumulative final stack vs current main
A branch-neutral external harness used the same database-backed 100/1,000-rule fixtures and ran twice per revision in the same environment. Caches were warm before Benchee measurement; retained deltas and allocation results reproduced across both runs.
Retained routing-cache memory
The ETS delta includes
Rules.Cacheand, on the final stack, the routing snapshot data/source/expiry tables:Interpretation:
%Rule{}records that have matched; final stores all compact targets immediately. That gives final a 29-33% higher first-event floor in the 1,000-rule sparse fixtures.Per-batch allocation
Benchee allocation for 1,000 rules:
These measurements are retained ETS deltas, externalized term sizes, and per-operation allocations—not total VM RSS.
Validation
MIX_ENV=test mix compilethrough project wrappers.MIX_ENV=test mix lint.all; only 32 existing design suggestions.MIX_ENV=test mix test.typings; 158 configured errors skipped, 10 existing unnecessary skips, task passed.4754419c.