Skip to content

Commit a371116

Browse files
codexByron
authored andcommitted
docs(perf): preserve pre-audit retained-handle measurements
Record the original retained-handle/opening benchmark, full-suite timings, launch counts and validation with their measured revision and local artifacts. These observations predate the Gix-only audit and include the Python reference-format, linked-worktree and negative-discovery shortcuts that the rewritten opening commit removes. Label the zero-call opening/discovery rows and their 69x/91x ratios as historical, superseded measurements. They must not be read as current Gix coverage or current performance. Keep the already-open journey and test observations alongside their original context rather than silently replacing old data with new claims. This documentation amendment reduces CLI calls by zero and changes no runtime behavior. Validation: `git diff --check` passed; the corrected opening commit already passed its focused Gix tests followed by CLI tests.
1 parent f437d84 commit a371116

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

‎doc/gix-backend.md‎

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,63 @@ individual timings and parity checks together. Opening/discovery remain
212212
separate lifecycle measurements. CI fails on execution/parity errors; timing
213213
ratios are observational on shared runners.
214214

215+
### Historical retained-handle and opening measurements
216+
217+
These results predate the Gix-only audit. The measured implementation inferred
218+
reference format, repaired linked-worktree metadata and rejected some discovery
219+
candidates in Python. Its zero-CLI counts and associated opening speedups do
220+
not establish Gix coverage and are superseded by the corrected implementation.
221+
Keep the raw observations below only as a historical record.
222+
223+
At `c49bbec0afb806df66a33fa9c5d76e21ac8f0314`, the same pinned fixture,
224+
official GixPython 0.1.0 and existing CPython 3.12.14/macOS arm64 interpreter
225+
were measured sequentially, Gix first and CLI second, after tests finished.
226+
Each backend used three worker processes, three values per worker, four loops
227+
per value and one warmup. All eleven result digests matched and the checked-in
228+
CLI ceilings passed. Raw local results are
229+
`/private/tmp/gitpython-retained-final-{gix,cli}.json`; this table is a journal
230+
snapshot, while CI continues to publish fresh measurements.
231+
232+
| Measurement | CLI mean ± stdev (ms) | GixPython mean ± stdev (ms) | CLI / Gix | Native / fallback | CLI launches: CLI / Gix |
233+
| --- | ---: | ---: | ---: | ---: | ---: |
234+
| journey | 209.44 ± 17.65 | 263.25 ± 5.52 | 0.80× | 55 / 2 | 23 / 1 |
235+
| inventory | 19.76 ± 0.78 | 0.89 ± 0.03 | 22.30× | 3 / 0 | 3 / 0 |
236+
| history_25 | 7.49 ± 0.17 | 79.02 ± 9.67 | 0.09× | 26 / 0 | 1 / 0 |
237+
| browse_tree_and_blob | 13.55 ± 0.39 | 2.06 ± 0.41 | 6.59× | 5 / 0 | 2 / 0 |
238+
| read_index | 6.96 ± 0.08 | 2.59 ± 0.47 | 2.69× | 1 / 0 | 1 / 0 |
239+
| revision_graph | 63.27 ± 2.57 | 32.72 ± 0.22 | 1.93× | 9 / 0 | 6 / 0 |
240+
| diff_and_stats | 20.78 ± 0.37 | 65.33 ± 1.25 | 0.32× | 5 / 0 | 3 / 0 |
241+
| patch_diff | 14.06 ± 0.39 | 8.61 ± 0.08 | 1.63× | 3 / 2 | 2 / 1 |
242+
| worktree_status | 56.61 ± 1.43 | 70.68 ± 2.18 | 0.80× | 3 / 0 | 5 / 0 |
243+
| open_repository | 69.28 ± 0.59 | 1.00 ± 0.07 | 69.20× | 1 / 0 | 11 / 0 |
244+
| discover_repository | 81.68 ± 0.68 | 0.90 ± 0.19 | 90.52× | 1 / 0 | 13 / 0 |
245+
246+
The pre-audit implementation launched no CLI processes for these opening and
247+
discovery probes. It measured about 69× and 91× faster lifecycle operations,
248+
while the complete already-open journey was about 26% slower with Gix. These
249+
lifecycle ratios include the shortcuts removed by the audit. Retaining a Python
250+
handle alone does not resolve the existing history/statistics costs. Several
251+
rows have `pyperf` sample-size or variability warnings, so timings describe
252+
this machine and workload rather than a general speed guarantee.
253+
254+
The full Gix suite without coverage passed **1,678 tests and 38 subtests**,
255+
with 79 skips and one expected failure, in **337.51 seconds (5m 37.51s)**.
256+
One expected path-expansion deprecation warning was reported. It recorded
257+
**22,319 `Git.execute` launches**: 3,833 setup, 18,486 call, zero teardown or
258+
collection/session. The process-lifetime count is 22,320 including the import
259+
probe. Against the preceding 408.81-second/30,898-launch baseline, this local
260+
run took 17.4% less time and launched 27.8% fewer CLI processes; the suite has
261+
four additional regressions, and the timing comparison is observational.
262+
263+
Affected tests ran with Gix before CLI: 304/264 repository, command, backend
264+
and safety tests; 136 command-guard tests per backend; 31 positional tests per
265+
backend; 13 process-count/budget tests per backend. Repository suites also
266+
passed 14 subtests, with three skips. Ruff lint/format, mypy and basedpyright
267+
passed. Both code changes are separate Tix commits: `02e2cc44` retains native
268+
handles and the original `c49bbec0` attempted zero-launch opening/discovery.
269+
The rewritten opening commit restores real format queries and native metadata
270+
fallbacks; the current coverage table and ceilings reflect those requirements.
271+
215272
### Test-suite setup measurements
216273

217274
The fixture optimizations below are implemented as separate commits, each

0 commit comments

Comments
 (0)