Open daifiyum opened 1 year ago
https://github.com/localsend/protocol/pull/5/files
v2 protocol not include Range
, Content-Range
supports
see https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range
i think, you need create issue to https://github.com/localsend/protocol
@septs Your comment has nothing to do with the original issue. Please comment on the pull request.
After some debugging, I have noticed, that HTTP is much faster than HTTPS. In my test case, HTTP reached 50 MB/s while HTTPS only reached 7 MB/s.
I am not sure how to fix this as I only use the Flutter API (both with dio
and with http
package).
Edit: It seems that Android is the device causing slow transmission speeds. Windows <-> macOS
reached 60 MB/s with HTTPS.
I'm on a 5GHz WiFi sharing files from Linux to Windows, but the transfer rate is incredibly slow.
ref: https://en.wikipedia.org/wiki/IEEE_802.11ac-2013#Data_rates_and_speed
Weirdly SAMBA is also slow on the same network:
Even more weirdly, it's faster in 2.4 GHz WiFi
Same network with WPA-3-AES encryption
Same issue when doing Windows <--> Android
or Windows <--> iOS
or iOS <--> Android
tried in both 5G or normal wifi. very sloww speed.
On my test case, I've sent a 4GiB file to 2 phones, Samsung A13 and A52 5G. The first run, one in 2.4G and another in 5G band(encryption closed in all of the tests), the 2.4G one had 2.5MB/s average with 3.0MB/s peak and the 5G one has 12 MB/s average with peak of 13MB/s. Same result when I switched the networks. My PC(source) btw is in 5G. When both in 5G band, either one maxes at 2-3MB/s and 6-8MB/s avg or they're stuck at 4MB/s. Well, they both fail before finishing the transfer tho.
Another Test case, Android to Android, A52 to A13, 1GiB test file, has the fastest speed(started at 10MB/s and ended at 40MB/s). Same thing on reverse. The thing is, when I quit the app, the sending stutters.
4GB test file: A13 to A52, 2.5G: 5.0-5.6MB/s A13 to Win11, A52 to A13, A13 to A52, A52 to Win11 2.5G to 5G: 5.0-6.0MB/s A52 to Win11, 5G: slowly rising to around 6.5-8.0MB/s A13 to Win11, A52 to A13 and A13 to A52e, 5G: 8.0-10.0MB/s
23 MB/s
12 MB/s
I'm noticing slowness too that is surprising to me.
I'm transferring a 4.4 GB file.
Linux -> Android
, with both devices on the same 5 GHz home wifi network, speeds observed are ~2.4 MB/s
LocalSend v1.13.1 (42)
OS | Image |
---|---|
Linux, Ubuntu 22.04.3 LTS sending | |
Android, Version 14 receiving |
I've also noticed that transfers are kind of slow.
On LAN (1G) 3.9GB file from the windows notebook to the linux pc transfers at 21 MBytes/s.
For comparison, rsync over ssh inside WSL from the same machine is 91.5 MBytes/s (which is worse than I get from the other PCs, but the notebook is quite a bit weaker than them, so that's expected).
I don't expect https and ssh to be the same speed, because different protocols (duh), but the difference looks too big.
A quick update:
It seems that the slow speed is caused by the inefficient HTTPS implementation. Thanks to @tom8zds who has implemented a Rust backend which you can checkout at this repo: https://github.com/tom8zds/localsend_rs The disadvantage with Rust is that it will make the build system much more complex, and I am not sure if you can compile it to all targets that LocalSend currently supports.
To sum up, you need to disable encryption if you want full speed. This has to be addressed by the Dart team. There is nothing LocalSend can do.
Related #1076
Will probably depend on https://github.com/localsend/localsend/issues/491 being implemented
After some debugging, I have noticed, that HTTP is much faster than HTTPS. In my test case, HTTP reached 50 MB/s while HTTPS only reached 7 MB/s.
I am not sure how to fix this as I only use the Flutter API (both with
dio
and withhttp
package).Edit: It seems that Android is the device causing slow transmission speeds.
Windows <-> macOS
reached 60 MB/s with HTTPS.
Can U tell me how to switch from https to http?:)
Can U tell me how to switch from https to http?:)
@miss5tability you need to go settings, enable "Advanced settings", disable "encryption". Edit: Make sure to disable encryption on all devices
i,m doing that but still maxed out 12-13 mb/s
https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Nie zawiera wirusów.www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
śr., 4 wrz 2024 o 11:17 Tien Do Nam @.***> napisał(a):
Can U tell me how to switch from https to http?:)
@miss5tability https://github.com/miss5tability you need to go settings, enable "Advanced settings", disable "encryption". Edit: Make sure to disable encryption on all devices
— Reply to this email directly, view it on GitHub https://github.com/localsend/localsend/issues/384#issuecomment-2328341575, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV2TYNQCKOCMB3QN6QFXCLLZU3F2HAVCNFSM6AAAAAAXAOG3HGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRYGM2DCNJXGU . You are receiving this because you were mentioned.Message ID: @.***>
-- Shalom
Good that I looked around in the issues section. FTP really works well for bidirectional transfers. Here's the gist
NOTE: You can delete this comment without informing if it is stupid 🫡
Is your feature request related to a problem? Please describe.
When transferring large files, such as files of a few gigabytes, the transfer speed is not fast enough, usually around 20MB/s. Even if the phone has 5G wifi enabled and the computer supports 5G wifi, this is still the case.
Describe the solution you'd like
I have conducted experiments and found that under 5G WiFi, computers and mobile phones can reach around 50MB/s through FTP transmission, sometimes even exceeding 100MB/s. Can LocalSend software consider supporting FTP transmission?
Describe alternatives you've considered
No response
Additional context
No response