Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this is super slow #12

Open
cirroprod opened this issue Jan 26, 2018 · 2 comments
Open

this is super slow #12

cirroprod opened this issue Jan 26, 2018 · 2 comments

Comments

@cirroprod
Copy link

transferring file A via standard SFTP to server A takes 5 mins.

Using StfpEx with the recommended stream syntax it takes ~85 minutes

def upload_file(conn, destination, source) do
File.stream!(source)
|> Stream.into(SftpEx.stream!(conn,destination))
|> Stream.run
end

@tolyo
Copy link

tolyo commented Aug 28, 2018

Try streaming in byte chunks as opposed to default lines. See docs for example.

@victormuramoto
Copy link

victormuramoto commented Aug 2, 2019

I made the changethat @tolyo suggeted, and worked like a charm. It started to be so quickly!

Just changed the File.Stream!(source) for

File.stream!(source, [], 2048)

Also, I think we can close the issue, what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants