Commit 01c00be
committed
[Fix] Warn when scan_hashtype forces software SHA-256 on non-SHA-NI CPU
When scan_hashtype is explicitly set to "sha256" or "both" on a system
without SHA-NI hardware acceleration, SHA-256 runs ~30% slower than MD5
in software. Previously this was silent — the admin had no indication
their override was costing performance.
Now logs a NOTICE (not a fallback — the admin's explicit choice is
honored) when _sha_capability="software" and scan_hashtype is sha256
or both, advising them to consider scan_hashtype=auto.
The default scan_hashtype=auto is unaffected — it already correctly
selects SHA-256 only with hardware support and MD5 otherwise.1 parent 6449d62 commit 01c00be
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
| |||
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
70 | 76 | | |
71 | 77 | | |
72 | 78 | | |
| |||
0 commit comments