Development record
The pre-commit name guard's awk decode of escaped spellings is superlinear in LINE length on macOS awk 20200816: 19 MB of escaped JSON over 105k lines decodes in 1.9 s, but the same bytes as one line take 65 s in awk and 88 s for the commit (the verify of fix3-drainS3). A minified single-line JSON export or asset pays it; the hook still completes and reports, so it is never silent. Both hook copies (.githooks/pre-commit and internal/core/ahoy/defaults/pre-commit) carry the decode.
issueresolvedminoriss-2609280945018822
The pre-commit name guard's awk decode of escaped spellings is superlinear in LINE length on macOS awk 20200816: 19 MB of escaped JSON over 105k lines decodes in 1.9 s, but the same bytes as one line take 65 s in awk and 88 s for the commit (the verify of fix3-drainS3). A minified single-line JSON export or asset pays it; the hook still completes and reports, so it is never silent. Both hook copies (.githooks/pre-commit and internal/core/ahoy/defaults/pre-commit) carry the decode.
Grounds
- pursued: decode time grows linearly with line length (1 to 16 MB: 0.11 to 1.70 s) and the decoded bytes match the regex-split decoder on the corpus; a gawk or mawk that read a one-character string separator as a pattern, or a superlinear curve on another awk, would show it wrong
Frontmatter
| id | iss-2609280945018822 |
|---|---|
| type | issue |
| lifecycle | resolved |
| severity | minor |
.abcd/work/issues/resolved/iss-2609280945018822-the-pre-commit-name-guard-s-awk-decode.md
open on GitHub ↗ · commit history ↗