Skip to content

TypedPython gate: cut the type-report overhead #21

Closed

Description

@b-re-w

What

The gate costs about 8× a plain pyrefly check (1800-line synthetic module, design §6.1). Most of it is presumably --report-pysa writing typeshed copies; that is not yet broken down. Measure where the time goes, and reduce it before the gate runs on every build (1b).

Done when

The measurement test shows the gate at ≤ 2× a plain pyrefly check, measured alone (AGENTS.md §8). Otherwise the remaining cost is explained, with numbers.

Activity

  1. b-re-w commented on Oct 3, 2026

    @b-re-w
    MemberAuthor

    Quiet-window reading (develop e888e7f, load about 1.2 at start): 1800-line module, plain pyrefly 278 ms, gate 1368 ms, ratio 4.93x. Under load it was 7.6x. Still above the 2x target. Next step, when usage allows: a numeric breakdown of the gate's fixed cost (pysa report, probe pass, forbidden-construct scan, process start-up) to decide between reaching 2x and closing with the breakdown, as agreed.

  2. b-re-w commented on Oct 3, 2026

    @b-re-w
    MemberAuthor

    Also covers the first-import delay of the development-mode import gate (#183): every first import of a changed module pays this fixed cost.

  3. added a commit that references this issue on Oct 24, 2026
  4. b-re-w commented on Oct 24, 2026

    @b-re-w
    MemberAuthor

    Landed in develop via #267 (8x -> 6.2x; remaining cost explained in the PR). Quiet-window number to follow.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions