| Comment: | logstore: answer a byte-aligned name prefix from the sorted directory
A complete SHA-1 name is shorter than max_hash_len, so it missed the full-width fast path and fell to the O(store) hex scan -- once per file under `ls --size` and `ls --long`. On tcl's tip the 545 SHA-1 named files cost ~54ms each against ~0.2ms for the 1,653 SHA3 ones. The directory is ordered by raw digest, so a prefix's matches form one contiguous run. A binary search for the run plus a walk of it proves uniqueness rather than assuming it, which is what the SHA-1 case was surrendered to the scan for. Odd-length prefixes end mid-byte and keep the scan. ls --size on tcl: 1.98s -> 0.03s. Issue #148. |
|---|---|
| Timelines: | family | ancestors | descendants | both | fix-148-prefix-lookup |
| Files: | files | file ages | folders |
| SHA3-256: |
4829f043b11cbbdd416b75d9abf670c2 |
| User & Date: | dmestas on 2026-08-25 18:30:47.365 |
| Other Links: | branch diff | manifest | tags |
|
2026-08-25
| ||
| 18:50 | merge fix-148-prefix-lookup: byte-aligned name lookup (#148) check-in: 3f8aa36a1d user: dmestas tags: trunk | |
| 18:30 |
logstore: answer a byte-aligned name prefix from the sorted directory
A complete SHA-1 name is shorter than max_hash_len, so it missed the full-width fast path and fell to the O(store) hex scan -- once per file under `ls --size` and `ls --long`. On tcl's tip the 545 SHA-1 named files cost ~54ms each against ~0.2ms for the 1,653 SHA3 ones. The directory is ordered by raw digest, so a prefix's matches form one contiguous run. A binary search for the run plus a walk of it proves uniqueness rather than assuming it, which is what the SHA-1 case was surrendered to the scan for. Odd-length prefixes end mid-byte and keep the scan. ls --size on tcl: 1.98s -> 0.03s. Issue #148. closed check-in: 4829f043b1 user: dmestas tags: fix-148-prefix-lookup | |
|
2026-08-24
| ||
| 21:41 | merge strata: stacked landings (#144) check-in: 2e060aa7c0 user: dmestas tags: trunk | |