PERFORMANCE.md

July 30, 2026 · View on GitHub

Performance comparison ⚡

Rev-dep can perform multiple checks on 500k+ LoC monorepo with several sub-packages in around 150ms.

It outperforms Madge, dpdm, dependency-cruiser, skott, knip, depcheck and other similar tools.

Here is a performance comparison of specific tasks between rev-dep and alternatives:

TaskExecution Time [ms]AlternativeAlternative Time [ms]Slower Than Rev-dep
Find circular dependencies151.4 ± 1.9knip3 039.9 ± 36.320x
Find unused exports186.4 ± 2.9knip3 176.1 ± 24.217x
Find unused files168.2 ± 1.8knip3 005.9 ± 34.018x
Find unused node modules170.0 ± 3.0knip3 068.9 ± 17.118x
Find missing node modules159.5 ± 3.0knip3 076.1 ± 29.819x
List all files imported by an entry point81.2 ± 1.9madge6 591.4 ± 129.281x
Discover entry points148.9 ± 3.8madge13 632.0 ± 137.192x
Enforce module boundaries164.1 ± 2.3dependency-cruiser8 139.6 ± 113.050x
Find restricted imports170.2 ± 3.9dependency-cruiser10 995.2 ± 130.765x
Find restricted importers179.0 ± 4.0dependency-cruiser9 233.6 ± 86.152x
Resolve dependency path between files220.8 ± 3.6please suggest
Count lines of code251.4 ± 31.2please suggest
Analyze node_modules directory sizes560.7 ± 54.5please suggest

Platform: WSL Linux Debian Intel(R) Core(TM) i9-14900KF CPU

Measurements: hyperfine -w 4 -r 8 (4 warm-up + 8 measured runs)

Project: 580k lines of code, 6024 source code files next.js app

Circular check performance comparison

Table below presents performance comparison between different tools performing circular imports detection.

rev-dep circular check is ~20 times faster than the fastest alternative.

ToolVersionCommand to Run Circular CheckTime [ms]
🥇 rev-dep3.0.0rev-dep circular153.6 ± 2.3
🥈 knip *6.29.0knip --cycles3 039.9 ± 36.3
🥉 circular-dependency-scanner3.0.1ds . -i <ignore globs>3 354.5 ± 32.6
dpdm-fast1.0.14dpdm --no-tree --no-warning --no-progress --tsconfig tsconfig.json + list of directories with source code6 069.7 ± 315.7
dpdm4.2.0dpdm --no-tree --no-warning --no-progress --tsconfig tsconfig.json --exclude 'node_modules|generated/prisma' + list of directories with source code6 667.4 ± 44.4
dependency-cruiser18.1.0depcruise --config <config> --output-type err + list of directories with source code8 257.7 ± 118.9
madge8.0.0madge --circular --extensions ts,tsx,js --ts-config tsconfig.json + list of directories with source code13 568.8 ± 63.7
skott0.35.11node script using skott findCircularDependencies function61 612.7 ± 132.6

* knip always ignores type-only import edges and offers no flag to include them. Every cycle in this codebase contains at least one, so knip reports 0 cycles - its 3 040 ms is a real full analysis, just of a smaller graph. rev-dep circular -t, which applies the same rule, agrees exactly (0 cycles) in 143.3 ms ± 10.3.

Platform: WSL Linux Debian Intel(R) Core(TM) i9-14900KF CPU

Measurements: hyperfine -w 4 -r 8 (4 warm-up + 8 measured runs)

Project: 580k lines of code, 6024 source code files next.js app