Repository navigation
Conversation
Module structure dependency edges are now collected in sorted order, so reports no longer depend on hash iteration order.
Node text, position and traversal helpers were copied in each tree-sitter analyzer. They now live in analyzers::syntax_tree, together with a single-pass walker for per-node visitors.
- Call graph maps use foldhash. - FunctionId hashes only the file name of its path; equal ids still hash equally. - Successful path canonicalizations are cached. - Uncertain calls are kept in a BTreeSet instead of a sorted vector with quadratic inserts. - Effect provenance shares its owner id through Arc.
- The unified analysis and data flow graph share one call graph through Arc instead of each holding a clone. - Call graph builders take the graph with mem::take. - Purity propagation borrows the graph, analyzes starting purity in parallel, and borrows propagated assessments. - The final analysis is dropped on a background thread after output is written.
- Entropy counts token windows by interned ids and builds patterns only for repeated windows. - Suppression regexes are compiled once per comment style, and suppression comments are parsed during the parallel file read. - Coupling metrics index dependents in one pass. - Duplicate chunks are grouped by a precomputed hash. - God object items are planned in parallel and applied in file order.
God-object scope collection sorted every function id once per item. Keep one sorted list, invalidate it when a new id is inserted, and binary-search the functions in one file.
File cohesion scanned every function and sorted every edge once per file. Look up ids in the sorted cache and read call counts built once per graph.
Parse-error checks, child lists, and tree walks were still copied beside the shared syntax tree helpers.
Metrics, purity and advanced checks of a Go function each walked its syntax tree separately. They are now per-node visitors driven by one shared traversal.
- Each Go source is read once and shared by framework evidence, import aliases and the symbol index. - Handler detection scans only lines that can register a handler. - Package import paths are computed once per directory. - Caller resolutions run in parallel and are added in caller order.
This was referenced Oct 18, 2026
This branch has not been 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.
Summary
Go analysis walks each function once, then resolves calls in parallel. This branch sits on
perf/common(#155) and targetsmaster.Changes
perf(go): Walk each function once
Metrics, purity, and advanced checks each walked a function's syntax tree. They are now per-node visitors driven by one shared traversal.
perf(go): Resolve calls in parallel
Test plan
just testdebtmap analyzeon a Go checkout and confirm the JSON matchesmasteraside from timestampsMade with Cursor
How to stack these
These pull requests target
master. From a clone ofiepathos/debtmap:perf/commonis #155. Then #156 Rust, #159 Go, #161 Solidity, and #160 TypeScript. The last three contain #155 and do not contain each other.gh stack merge 156stops after Rust.