Skip to content

W4 (part two): measure AUTO_CACHE and a held catalogue context, keep neither - #28

Merged
donislawdev merged 1 commit into
mainfrom
perf/w4-auto-cache
Sep 29, 2026
Merged

donislawdev merged 1 commit into
mainfrom
perf/w4-auto-cache

Conversation

@donislawdev

Copy link
Copy Markdown
Owner

Summary

The second part of W4 from the performance series: a prototype of WTD_STATEACTION_AUTO_CACHE on the catalogue path of the signature check, measured before anything in the product changed.

Result: rejected, and the product does not change behaviour. This PR only writes the measurement next to the code it is about, so the next outside review does not propose it again.

  • On one thread the time spent in WinVerifyTrust is the same with and without AUTO_CACHE, within the spread, even with the files grouped by catalogue.
  • On several threads it is worse. The state handle stays zero after every call, so the cache lives inside the process and the calls queue behind each other: the catalogue path took 1380-1497 ms of wall clock at sixteen processors against 347-403 ms, and 1141-1442 ms against 1017-1287 ms at two.
  • A catalogue context held per worker instead of per file saves about 1 ms per file on its first lookup. On two processors that is two or three percent of the 4247-4877 ms pass, smaller than the pass's own spread, so it is not done either.

Measured on 797 entries, 531 distinct files, 195 of them through 77 catalogues, with the verdicts compared file by file across every variant (no divergence).

Test plan

  • Architecture tests 182/182 (the change is comments only)
  • Mutation registry anchors checked, none stale
  • Prototype self-test: a planted wrong hash on a warmed state was reported as the single divergence

🤖 Generated with Claude Code

…sured

WTD_STATEACTION_AUTO_CACHE was prototyped against the product's catalogue
path, file for file with identical verdicts, and rejected: no gain on one
thread, and on several threads the calls queue behind a process-wide state,
so the catalogue path took four times the wall clock at sixteen processors.
A catalogue context held per worker saves about 1 ms per file on the first
lookup, two or three percent of the pass on two processors, which is inside
the pass's own spread. Comments only, no change in behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 528cac1e-b512-4c59-8502-38240a3b7420


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@donislawdev
donislawdev merged commit 47ef230 into main Sep 29, 2026
8 checks passed
@donislawdev
donislawdev deleted the perf/w4-auto-cache branch September 29, 2026 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant