Commit 8cef606
fix(convert): π warn when fine chunks mean a million files
Capping the output chunk by the source's granularity is what stops the
conversion OOMing, but it has a cost worth naming: for the stitched-TIFF case
level 0 goes from ~60k chunks to ~950k, and without sharding a chunk is a
file. That lands on a shared filesystem at write time and on every read
afterwards.
Sharding fixes it without touching the chunking -- and safely, because
_auto_shard grows the two largest axes, which are y and x, so a shard still
lives inside one source plane and needs no more memory than a chunk did. For
the real dataset that is 4,536 files instead of 952,560.
So the write now says so, with the setting to change, rather than leaving it
to be discovered later.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 34debac commit 8cef606
2 files changed
Lines changed: 58 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
469 | 500 | | |
470 | 501 | | |
471 | 502 | | |
| |||
706 | 737 | | |
707 | 738 | | |
708 | 739 | | |
| 740 | + | |
709 | 741 | | |
710 | 742 | | |
711 | 743 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
0 commit comments