Commit 3b2f5fa
perf(snapshots): Parallelize image hashing with rayon
Use rayon's par_iter to hash all images concurrently instead of
sequentially. Also increase the hash read buffer from 8KB to 64KB
to reduce syscall overhead. Reduces hashing time from 5.3s to 0.8s
(6.6x speedup) on a 753-image / 99MB dataset.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 938a884 commit 3b2f5fa
1 file changed
+10
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
231 | 232 | | |
232 | 233 | | |
233 | 234 | | |
234 | | - | |
| 235 | + | |
235 | 236 | | |
236 | 237 | | |
237 | 238 | | |
| |||
338 | 339 | | |
339 | 340 | | |
340 | 341 | | |
341 | | - | |
342 | | - | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
343 | 349 | | |
| 350 | + | |
344 | 351 | | |
345 | 352 | | |
346 | 353 | | |
| |||
358 | 365 | | |
359 | 366 | | |
360 | 367 | | |
361 | | - | |
362 | 368 | | |
363 | 369 | | |
364 | 370 | | |
| |||
0 commit comments