Skip to content

perf: memoize import resolution#54

Merged
longlho merged 2 commits into
mainfrom
codex/profile-kibana
May 22, 2026
Merged

perf: memoize import resolution#54
longlho merged 2 commits into
mainfrom
codex/profile-kibana

Conversation

@longlho
Copy link
Copy Markdown
Contributor

@longlho longlho commented May 22, 2026

Summary

  • memoize per-analysis import resolution results inside ModuleResolver
  • refresh benchmark docs for VS Code, Grafana, Kibana, and Renovate
  • keep file reads and parsing unchanged; the optimization targets repeated resolver work rather than the FileCache path

Benchmark Notes

--samples 3 --warmups 1 --skip-build with the optimized Codescythe binary:

Fixture Codescythe Knip
VS Code 1111.9ms +/-1.36% 4223.1ms +/-4.89%
Grafana 833.2ms +/-4.11% 9513.4ms +/-56.75%
Kibana 12963.8ms +/-25.85% 53327.5ms +/-33.69%
Renovate 154.5ms +/-4.79% 900.5ms +/-6.09%

Kibana-specific direct warm timings improved from roughly 13.1s-13.2s before the resolver cache to 11.2s-12.5s after the cache in repeated local runs.

Validation

  • git diff --check
  • bazel build -c opt //crates/codescythe_cli:codescythe
  • bazel test //crates/codescythe:codescythe_test
  • bazel test //benchmarks:kibana_fixture_test

//benchmarks:kibana_conformance_test still fails locally only on the known existing macOS/Linux snapshot total-file count drift: local macOS generates 85952/85936, while the checked-in Linux CI snapshot is 85960/85944.

@longlho longlho merged commit 6cdf3c9 into main May 22, 2026
1 check passed
@longlho longlho deleted the codex/profile-kibana branch May 22, 2026 14:36
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