* optimize(main-pipeline-performance): reuse verified dependency hashes during parsing * docs: record main pipeline performance results * test(core): verify disk-backed parser hash reuse in isolation Use a fixture-owned cache for the resume regression and document how to attribute repeated dependency reads to the measured process. * refactor(core): simplify parser file digest cache lookup --------- Co-authored-by: Gergo Magyar <gergomagyar0@gmail.com>
2.4 KiB
| title | date | module | problem_type | component | severity | symptoms | root_cause | resolution_type | tags | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Finding repeated file reads during HTTP embedding resume | 2026-11-23 | Analyzer and parser identity | performance_issue | tooling | medium |
|
redundant_io | code_fix |
|
Finding repeated file reads during HTTP embedding resume
An HTTP resume benchmark starts the CLI twice. The first invocation builds the graph and deliberately interrupts embedding. The benchmark times the second invocation, which finishes the pending inputs. Both write CPU profiles to the same case directory. The explicit CI job also uploads a profile for fresh HTTP embedding, a different workload.
From gitnexus/, set BASE_CLI to the comparison checkout’s built CLI and RESULTS_DIR to a directory for new output. Capture one diagnostic pair on the resume workload.
node bench/analyze-resume/measure.mjs --cpu-profile --scenarios http-resume \
--pairs 1 --warmups 0 --baseline "$BASE_CLI" --output "$RESULTS_DIR/profile.json"
- Use each side’s
setup.logandmeasured.logto locate the second invocation. Match the profile timestamps and PIDs to that interval. A heap-budget relaunch can produce both a launcher profile and a profile for the child that actually analyzes the repository. - If hashing dominates the measured child, collect the paths and byte counts from
onHashedInputon both identity resolvers in the same installation. Join by physical file path and sum the overlapping bytes. The two resolvers use different public identity formats, so matching their final digest strings cannot identify duplicate reads. - Check the reuse path against an independent cold parser read. Compare both the base and PDG parser identities, then change one dependency without changing its size and verify the new bytes are read. Confirm the elapsed-time result separately with the unprofiled
--checkrun and equal embedding-input fingerprints.
On the measured installation, 830 regular dependency files accounted for 495 MB read by both resolvers. Reusing their raw content hashes left 14 MB for the parser to read. The analyzer still framed each content hash with its artifact metadata when constructing the public dependency digest. Measurements and confidence intervals