Repository navigation
perf(resolve): seed the dictionaries once per session, and log where each resolve's time goes (#1429) - #1493
Merged
Merged
Conversation
…each resolve's time goes (#1429) After #1482 er-dev resolve was p50 1660 / p95 2015 ms (pod at its 1-CPU limit). Single-threaded, as that pod runs, the local 520k benchmark is p50 260 / p95 282 ms. So er-dev's extra ~1.4 s is something only production has. The prime suspect is the dictionaries: every call dropped and re-seeded the nickname lexicon and ignore-words tables, which are tiny in the fixtures and large in production. - A persistent ResolveCache seeds the dictionaries once per content hash. - er_cli logs one 'resolve timings' event per call (seed, standardize, prefilter, prepare, predict, select, total, and the corpus candidates kept). er-server logs 'resolve inputs loaded' with the model, config and dictionary load time and the dictionary sizes. The next er-dev pass shows where any time remains. - resolve_latency_at_scale times single-threaded by default (ER_RESOLVE_THREADS), matching the pod. Co-Authored-By: Claude Opus 5.5 <[email protected]>
athvin
temporarily deployed
to
marketing-preview
November 30, 2026 07:33 — with
GitHub Actions
Inactive
This branch was previously 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.
Closes #1495
Part of #1429. #1429 stays open until er-dev measures p95 under 300 ms.
What
ResolveCacheseeds the nickname lexicon and ignore-words tables once per content hash, instead of dropping and re-inserting them on every call.resolve timingsevent per call: seed, standardize, prefilter, prepare, predict, select, total, pluscorpus_candidates(the corpus rows the prefilter kept).resolve inputs loaded: the time to read the model, config and dictionaries, and the dictionary sizes.resolve_latency_at_scaleruns single-threaded by default (ER_RESOLVE_THREADS) to match the 1-CPU web-api pod.Why
After #1482, er-dev resolve was p50 1660 / p95 2015 ms, with the pod pinned at about 0.8 of its 1-CPU limit. Single-threaded, the local 520k benchmark runs p50 260 / p95 282 ms. So er-dev's extra ~1.4 s is something only production has. The prime suspect is the per-call dictionary reseed: those tables are tiny in the fixtures and large in production. The timing events confirm or rule that out on the next pass, without another round of guessing.
Proof
acct_(12) pass.make check: exit 0.Risk & rollback
git revert <merge-sha>.Post-merge ledger
Closed by: unclosed
mainis green with this change on it — the merge SHA, and the runthat proves it. A later head SHA with this commit as an ancestor counts;
a cancelled run with zero jobs does not:
imagesbuilt, or correctly never ran because nothing that goes intoan image changed:
deployconverged — proved by a line the running process emitted, notby the image digest and not by the workflow conclusion:
deploy,drift,kind's nightly leg) is green, or knowingly red for a reason that is notthis change:
Donethrough the automation rather than byhand, and the issue closed:
(a skill, a reference, memory) — or nothing new was learned:
Specific to this change
resolve timingsbreakdown from the web-api logs, 55 calls on p3live:🤖 Generated with Claude Code