Skip to content

when receiving a large file, "exporting" takes significant additional time (few minutes) #120

Open

Description

@belkka

Issue

when receiving a ~4G file there was a an "export " stage at receiving side that took multiple minutes, after the sender finished the transaction on their side

Possible cause

@matheus23 pointed out that sendme uses ExportMode::Copy from iroh-blobs, instead of other existing option, ExportMode::TryReference.
https://docs.rs/iroh-blobs/latest/iroh_blobs/api/blobs/enum.ExportMode.html

This leads to file being copied from "internal store" to target location (instead of being moved).

To confirm, I measured that on receiving file system copying the 4G file took around 7.5 minutes, which matches the previously observed delay.

Activity

  1. belkka commented on Nov 26, 2025

    @belkka
    Author

    Possible solution

    Could ExportMode::TryReference be used instead of ExportMode::Copy?

    Some supporting thoughts:

  2. changed the title [-]when receiving a large file, "exporting" takes significat additional time (few minutes)[/-] [+]when receiving a large file, "exporting" takes significant additional time (few minutes)[/+] on Nov 26, 2025
  3. mrsarthi commented on Oct 21, 2026

    @mrsarthi
    Contributor

    I looked into this, and the export mode changed from TryReference to Copy in #104, which looks like the workaround for #103 (duplicate files only arriving once). @matheus23 also asked about it in #104.

    Now on current main, the #103 case seems fixed in iroh-blobs. With TryReference, I sent a 2.79 GB file (on the same machine), and I sent a folder with three identical 50 MB files and two identical small files, and all five arrived as it is intact.

    Timing on Windows

    • Copy: ~108 s
    • TryReference: ~18 s

    It's a one-line change in export(). Would you be open to a PR switching it back?

  4. moved this to 🏗 In progress in irohon Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      🏗 In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions