Skip to content

Run the internal depth and speed measurements weekly #528

Open

Description

@JuroOravec

Problem

During the 0.7.0 work we measured many internal limits and speeds by hand: how deep a template can nest before a stack runs out, how citry check and the formatter scale with nesting depth, how the editor's search scales, how many stack frames a slot chain costs. Each measurement was run once, for one pull request, and then dropped. Nothing tells us later if one of them gets worse again. A slowdown that grows with the square of depth, or a stack limit that shrinks, only shows up when a user hits it.

Proposal

Run these measurements once a week and keep their results, so a regression shows up as a change between weeks instead of a user report.

  • Run them in one place, ideally as a step in an existing weekly job such as py--tests-cross-browser.yml or py--alt-interpreters.yml, not as a new workflow.
  • Use release builds, because CI's ordinary test jobs already build release extensions (uv sync builds the release profile).
  • For each measurement, record the numbers (a JSON artifact, or a file committed to benchmarks/results/) and fail, or open a tracking issue, when a value crosses its threshold.
  • Prefer ratios over absolute times where the measurement is about growth (time when the depth doubles), because ratios survive runner noise much better than raw seconds.

Measurements to start from

Each pointer is where the measurement or its script came from.

Growth with nesting depth (time per depth doubling)

Stack depth and frame budgets

Ordinary speed (the "no slower than 2%" gates)

Idle behaviour

Open questions

  • Where results are kept, and for how long (artifacts expire; a committed file grows).
  • Thresholds: a fixed number per measurement, or a change against the previous week.
  • Noise: GitHub runners vary, so the gates that compare two builds should alternate them in one job, as the local gates did, rather than compare against last week's absolute times.

Activity

  1. added
    next-sprint
    on Oct 28, 2026
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

    next-sprint

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions