Skip to content

perf: CLI scan performance audit and optimization #837

Description

@sonukapoor

Overview

Profile the CLI's end-to-end scan execution time and identify the highest-impact optimizations.

Motivation

As the feature set grows (override hygiene, phantom detection, maintenance risk, SARIF output), scan time should be validated against the original fast-scan promise. This issue tracks a focused performance audit to find and fix the top bottlenecks.

Scope

  • Profile a representative scan (medium-sized project, ~500 packages, live OSV queries)
  • Identify the top 3-5 slowest paths (network I/O, parsing, fix validation, output rendering)
  • Implement targeted fixes - no speculative optimization
  • Measure before/after for each change

Candidates to investigate

  • OSV batch query efficiency
  • Packument fetch parallelism and cache hit rate
  • Lockfile parsing time on large monorepos
  • Fix validation concurrency (validateDirectFixTargets)
  • Output rendering for large finding sets

To be done in-house

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions