perf(tools): read checker file contents through one git cat-file process #5748
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5748"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by AlexOfTheForest on 2026-10-14T09:15:02Z.
What
Checkread every technical debt file and every changed file with its owngit show, so each run started one git process per file, and the count grew withdocs/dev/debt. Process start-up dominates on Windows.The blobs the checks use are now read in one
git cat-file --batchprocess, keyed by the object idsls-treealready returns, andduplicates()batches the files it inspects the same way. Paths that are not cached still go throughgit show, so failures are unchanged.Git processes per run (Linux, wrapper counting every
gitstart):main~40..main)test_check_conventions_comments.py(#5672)Refs #5672. This removes the checker's per-file processes, but most of that test's processes come from its own repository setup, so it complements the sharding in #5678 rather than replacing it (the two merge cleanly).
Tested
Linux, relinker-only build: ctest passes 159/159 with
--timeout 30. Newconventions_blob_readsfails on main (11git showwith two debt files, 49 with forty) and passes with this change. Alltools/testspass. Checker output is byte-identical before and after on 40 three-commit ranges ofmainhistory, including one with a finding. Not measured on Windows.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-14T10:28:38Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)tools/check_conventions.pyL135-138Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-14T13:18:53Z.
Checked: the batched reads fall back to
git showfor uncached paths, missing objects are skipped by the header check, andconventions_blob_readsfails without the change (process count grows with debt files) and passes with it. Conventions and relinker CI green; merging.Imported from boykopovar/AnyPS5. Originally posted by AlexOfTheForest on 2026-10-14T13:23:26Z.
Thanks ;)