Bug
In src/cmds/system/deps.rs, three Regex::new() calls use static patterns but are compiled inside function bodies, causing recompilation on every invocation:
summarize_cargo_str(): dep_re (line 85-86) and section_re (line 87)
summarize_requirements_str(): dep_re (line 174)
Per project convention, static regex patterns must use lazy_static! to compile once at first use.
Impact
Unnecessary CPU overhead on every rtk deps call. The regex engine parses and compiles the same patterns repeatedly instead of caching the compiled automaton.
Fix
Move all three patterns to a lazy_static! block at module scope.
Bug
In
src/cmds/system/deps.rs, threeRegex::new()calls use static patterns but are compiled inside function bodies, causing recompilation on every invocation:summarize_cargo_str():dep_re(line 85-86) andsection_re(line 87)summarize_requirements_str():dep_re(line 174)Per project convention, static regex patterns must use
lazy_static!to compile once at first use.Impact
Unnecessary CPU overhead on every
rtk depscall. The regex engine parses and compiles the same patterns repeatedly instead of caching the compiled automaton.Fix
Move all three patterns to a
lazy_static!block at module scope.