Performance review of the hot scan path identified several opportunities to reduce wall-clock time, particularly for large monorepos with many transitive findings. Reported context: a Discord engineer noted the tool is "within acceptable range but slower than I'd like" on a ~600-repo monorepo.
Critical (biggest impact)
Important
Minor
Performance review of the hot scan path identified several opportunities to reduce wall-clock time, particularly for large monorepos with many transitive findings. Reported context: a Discord engineer noted the tool is "within acceptable range but slower than I'd like" on a ~600-repo monorepo.
Critical (biggest impact)
getVuln()detail fetches inscanner.ts— done in PR perf: parallelize network I/O in scanner to reduce scan time on large lockfiles #646. Gatsby cold cache: 28.4s → 12.7s (2.2x faster).scanner.ts— done in PR perf: parallelize network I/O in scanner to reduce scan time on large lockfiles #646.Important
npm-lock-graph.ts— Set accumulators, O(E×V) → O(E). Done in PR perf(npm-lock-graph): use Set accumulators for edge lists #652.npm-lock-graph.ts— done in PR perf(npm-lock-graph): pre-freeze node objects at construction time; remove redundant uniquePathArrays #654.Map<string, PackageRef>by name before the remediation loop to replace linearpackages.find()scans — done in PR perf(remediation): replace linear packages.find() with Map lookup for O(1) access #653.Minor
findings.filter()passes into one inscanner.tsnew Date().toISOString()once before the cache-write loopuniquePathArrays()inpathsFor()— done in PR perf(npm-lock-graph): pre-freeze node objects at construction time; remove redundant uniquePathArrays #654.