Commit 6fa0780
committed
Perf: Use
`SmbVolume::import_single_file_with_progress` and `write_from_stream` called `writer.finish()` on cancel, which forces a server-side FLUSH (fsync) on a file we're about to delete anyway. Swap to the new `writer.abort()` from smb2 `1d91384`, which drains in-flight WRITE responses to keep credits/message IDs in sync but skips the fsync and does a best-effort CLOSE. Saves ~100 ms to ~1 s on slow NAS cancels.
Also bumped Cargo.lock to pick up smb2 `1d91384c` (the `abort()` release).smb2::FileWriter::abort() on cancelled uploads1 parent d56c1df commit 6fa0780
3 files changed
Lines changed: 32 additions & 31 deletions
File tree
- apps/desktop
- src-tauri/src/file_system/volume
- src/lib/file-operations
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
382 | 383 | | |
383 | 384 | | |
384 | 385 | | |
| |||
1385 | 1386 | | |
1386 | 1387 | | |
1387 | 1388 | | |
1388 | | - | |
1389 | | - | |
1390 | | - | |
1391 | | - | |
1392 | | - | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
1393 | 1395 | | |
1394 | 1396 | | |
1395 | 1397 | | |
| |||
2626 | 2628 | | |
2627 | 2629 | | |
2628 | 2630 | | |
2629 | | - | |
| 2631 | + | |
2630 | 2632 | | |
2631 | 2633 | | |
2632 | 2634 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
0 commit comments