Skip to content

docs(openspec): plan #2369 speed up startup-import probes - #2985

Merged
dan-petty merged 1 commit into
mainfrom
perf/2369-the-startup-import-tests-start-56
Nov 1, 2026
Merged

dan-petty merged 1 commit into
mainfrom
perf/2369-the-startup-import-tests-start-56

Conversation

@devops-cli-service

Copy link
Copy Markdown
Contributor

Plans #2369

Replace -X importtime with a sys.modules dump in the 56 startup-import probes. The budget check only needs the set of module names, which sys.modules provides at the end of the run. The -X importtime flag stays for the failure diagnostic: when a budget is breached, the probe re-runs with -X importtime to build the ten-slowest-imports message. All 56 probes, all four limits, and the control test are unchanged. The file takes at most half its present CPU time over three runs of pytest tests/commands/test_cli_startup_imports.py -n 0.

Change: openspec/changes/2369-the-startup-import-tests-start-56/

@devops-cli-service
devops-cli-service Bot marked this pull request as ready for review November 1, 2026 06:57
@dan-petty
dan-petty merged commit 78726a3 into main Nov 1, 2026
18 checks passed
@dan-petty
dan-petty deleted the perf/2369-the-startup-import-tests-start-56 branch November 1, 2026 10:20
dan-petty added a commit that referenced this pull request Nov 1, 2026
This change removes the plan folder
`openspec/changes/2369-the-startup-import-tests-start-56/`. The Service
staged it in pull request #2985.

The plan drops `-X importtime` from the startup-import probe. Its goal
is half of the CPU time of `tests/test_cli_startup_imports.py`. The
measure shows that the flag does not change the CPU time. The ratio of a
probe without the flag to a probe with it is 0.97 to 1.02. So the plan
cannot meet its goal.

The issue goes back to New with the evidence. A new item can re-scope it
after #2164 moves this budget into a `devops ci` row.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant