You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rust module path lookups rescan every node per use edge, so cold Rust builds take tens of minutes #5665
On v8 at d249de36 (0.9.124), a cold build of a Rust workspace spends almost all of its time in _rewire_unique_stub_nodes at graphify/extract.py:5324.
For every Rust use crate::, super::, self:: or workspace crate path, the pass scans the whole node list and calls Path.resolve() on node paths. _module_file_nodes, _module_nodes_from, _lib_file_for_crate and _unmanifested_module_nodes each repeat that scan per edge, so the cost is Rust use edges times graph nodes.
Cold graphify update .
Total
_rewire_unique_stub_nodes
rust-analyzer 54bb01f636
1890s
1862s
tauri 4bcbccecce
118s
about 105s
To reproduce, clone tauri at 4bcbccecce and run time graphify update . on Linux with CPython 3.12.3.
Expected: each lookup costs work per distinct file, and the output does not change.
changed the title [-]Rust module-path lookups rescan every node per use edge, so cold Rust builds take tens of minutes[/-][+]Rust module path lookups rescan every node per use edge, so cold Rust builds take tens of minutes[/+]on Dec 1, 2026
Activity
github-actions commentedon Dec 1, 2026
Thanks for opening this issue, @Max17190. A maintainer will take a look soon.
If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.
To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.
[-]Rust module-path lookups rescan every node per use edge, so cold Rust builds take tens of minutes[/-][+]Rust module path lookups rescan every node per use edge, so cold Rust builds take tens of minutes[/+]