Repository navigation
Commit aff3b32
committed
fix(saf): duplicating a large file no longer crashes the app (#1023)
Copying read the whole file into memory first, so duplicating a 118 MB attachment
ran a 192 MB heap out and took the app down. It streams now, in 64 KB pieces. On
an emulator the same file copies in 0.5 s with an identical sha256, alone and
inside a folder duplicate.1 parent e38ea34 commit aff3b32
1 file changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
546 | | - | |
547 | 546 | | |
548 | 547 | | |
549 | 548 | | |
| |||
557 | 556 | | |
558 | 557 | | |
559 | 558 | | |
560 | | - | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
561 | 564 | | |
562 | | - | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
563 | 568 | | |
564 | 569 | | |
565 | 570 | | |
| |||
0 commit comments