Repository navigation
Commit b9eb46e
committed
perf(tests): reduce Windows submodule process overhead
Windows process startup makes repeated Git version probes and missing-hook
checks costly in the submodule tests. A relative `git` executable also
prevents the existing minimum-version cache from being shared on Windows.
Resolve `git.exe` from `PATH` to an absolute `GIT_PYTHON_GIT_EXECUTABLE` for
Windows CI and the local runner, preserving explicit overrides. Use the
selected executable for the runner's direct Git commands. Pass
`skip_hooks=True` at 70 submodule fixture commit sites, preserving normal
`IndexFile.commit()` defaults and dedicated hook coverage.
Match CI's private configuration by appending the alias fixture directly
and retaining `core.autocrlf=true` on Windows. The previous `include.path`
forced Gix repository reloads during local measurements. Document the Git
Bash invocation and distinguish these local setup corrections from CI gains.
Validation also exposed a daemon-test deadline shorter than Windows' closed
loopback-port refusal delay: fresh closed ports returned `TimeoutError` at
two seconds and `ConnectionRefusedError` just after 2.02 seconds. Allow five
seconds for the post-shutdown check while retaining its strict refusal
assertion and restart coverage.
A controlled, serial 37-case Windows Gix sample with identical flat config,
profiling enabled and coverage disabled improved from 87.10s to 77.20s.
Git launches fell from 1,437 to 1,128: 132 fewer version probes and 177 fewer
hook checks. This is about 11% faster in the sample, not a full-suite estimate.
Validation used CPython 3.12.13, Git 2.55.0.windows.5 and `GixPython` 0.1.0:
- Both complete submodule modules and related checks ran with CI's coverage
options. CLI finished with 542 passed, 1 skipped, 1 xfailed and 3 xpassed.
- The initial Gix selection had 546 passed, 1 failed, 1 xfailed and 3 xpassed.
Its sole failure was the daemon deadline corrected here; that regression
passed on a targeted rerun and in the subsequent CLI run.
- Replaying the original submodule source from `c3a2832b` reproduced the CLI
`test_base_rw` file-lock skip, confirming it predates these changes.
- Pre-commit checks passed for all changed files. Git Bash checks covered
executable resolution, explicit overrides and the non-Windows branch;
changed Python files also parse with Python 3.8 syntax.1 parent 863bb76 commit b9eb46e
6 files changed
Lines changed: 143 additions & 74 deletions
File tree
- .github/workflows
- doc
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
226 | 231 | | |
227 | 232 | | |
228 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
56 | 74 | | |
57 | 75 | | |
58 | 76 | | |
| |||
518 | 536 | | |
519 | 537 | | |
520 | 538 | | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
521 | 568 | | |
522 | 569 | | |
523 | 570 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
22 | 30 | | |
23 | 31 | | |
24 | 32 | | |
| |||
28 | 36 | | |
29 | 37 | | |
30 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
31 | 46 | | |
32 | 47 | | |
33 | | - | |
| 48 | + | |
34 | 49 | | |
35 | | - | |
36 | 50 | | |
37 | 51 | | |
38 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
201 | 202 | | |
202 | | - | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| |||
0 commit comments