Skip to content

fix(perf): pass symbolsOnly to parseFilesWasmInline for small-batch incremental builds #1437

@carlos-alm

Description

@carlos-alm

Problem

parseFilesWasmForBackfill accepts an opts.symbolsOnly flag that is intended to skip AST/complexity/CFG/dataflow visitors for callers that only consume definitions/calls/typeMap (native post-passes). However, when filePaths.length <= INLINE_BACKFILL_THRESHOLD (16 files), the function falls back to parseFilesWasmInline, which ignores opts.symbolsOnly and always runs full extraction.

This means the symbolsOnly optimization introduced in PR #1436 is a no-op for typical 1-file incremental rebuilds (which are exactly the path the post-pass scoping fix targets).

Impact

Fix

Add an analysis parameter to parseFilesWasmInline and plumb EXTRACT_ONLY through when opts.symbolsOnly is true. This requires modifying the extractor entry points (extractSymbolsQuery/extractSymbolsWalk) to accept and respect an analysis-mode flag, skipping their AST/complexity/CFG/dataflow sub-walks.

Deferred from PR #1436 review (Greptile P2, Claude flagged as non-blocking).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions