-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Sending a folder full of many small files take a very long time #790
Comments
what are the results of your |
@schollz I just ran into the same issue and searched if someone already reported the issue. I often run into this when e.g. transfering git repos via croc to a server. This is the easiest way for you to reproduce: Take a large git repo (e.g. this one) and transfer it somewhere. You will see that it won't utilize your network fully. |
Sorry for not replying earlier 😅 Here is my traceroute
|
@lukas-mertens maybe the |
@schollz Yes, that should solve it. I don't know if this is out of scope, but a cool way to increase UX of this would be to detect if there are many small files to transfer and then interactively ask the user "Detected many small files. Do you want to enable "--zip true" to speed up transfer (Y/n)?" I didn't know this option exists |
The problem with the zip option is:
Please consider sending multiple files at the same time, as an optional parameter set by default to 1 |
@AbdoMahfoz would welcome pr, thanks |
On it 🫡 |
Now that this is a thing, should we reopen this issue? |
@AbdoMahfoz sounds good, looking forward to the pr |
When sending a folder, croc sends files one by one. This is fine as long as the size of individual files is bigger than the transfer speed, but when transferring a folder full of files size of each is less than 100 kb, the transfer becomes super slow over a transfer channel of 30 Mbps peed.
I understand that using the zip option will fix this, but sometimes I find myself needing to sync a folder in my machine with a folder in my friend's machine who only has some of the files that I have in that folder. zipping will have him download everything.
If croc takes a parameter that allows the user to specify how many files should be sent in parallel, this will fix this issue. If you think that this feature can be harmful in other scenarios, make that parameter default to 1.
The text was updated successfully, but these errors were encountered: