rad experiment show 9936649b86f0c775f9592a7b84093704a7c7e71b
by ee@did:key:z6MkvsiybCuk1WDZhh2aXDx7NTiZejKgWZygMNsUuXDMNvVQ · Apr 11 20:05 2026
otel auto-instrumentation via require()
Measurements
Metric
BaselineThe benchmark measurement of the unmodified code
CandidateThe code with the proposed optimization applied
DeltaThe performance change from baseline to candidate
tsc_check_ms (ms)primary
1009.000 ms (n=1)
1003.000 ms (n=1)
-0.59%
Annotations
hypothesis
Load @opentelemetry/auto-instrumentations-node via require() with any-cast so tsc never pulls its 128-file instrumentation graph (incl @types/aws-lambda) into the program
next_action_hint
Further file-graph pruning is NOT a productive lever against this benchmark. The warm run floor is ~1000 ms dominated by npx/node startup + tsc bootstrap, not file-graph traversal. To go below 1000ms without touching bench/, need to shrink the src/ type graph specifically or find a tsconfig flag that shortcuts the incremental verification step. Consider: assumeChangesOnlyAffectDirectDependencies, or investigating whether the tsbuildinfo format supports skipping hash verification.
rollback_reason
File count dropped 1291 -> 1094 (-197) but warm median only improved 1009 -> 1003 ms (-6 ms), well within the ~20 ms noise band. Incremental mode already caches those files after run 1 so additional file-graph pruning yields diminishing returns. The cost (require() hack, any-cast, reduced type safety for SDK setup) outweighs the marginal win.
Base CommitThe starting commit before the optimization was applied