snapdrop
snapdrop copied to clipboard
Extremely slow?
My phone measures 250mbit/s to the Internet on 5GHz. Yet, it takes 2-3 minutes to copy a 40MB file from my phone to my desktop using Snapdrop, which I assume is purely using the local network?
I want to know this as well. Came here for this.
There is a TURN server configured (https://github.com/RobinLinus/snapdrop/blob/master/client/scripts/network.js#L515-L517), however, it seems to be offline. So the files will only be sent p2p in the local network. We don't yet understand why the speed is sometimes so slow. It might have to do with the fact that files need to be fragmented before they are sent.
What prevents you from using simpler protocols like sftp, ssh, ftp, which can all be faster? I'm not too familiar with what you have at your disposal with js
The goal with Snapdrop is that it is usable without installing anything. So we are limited to the APIs the browser provides. Since we want to transfer 2p2 we need a browser API that opens a listening port and serve the protocol on that port. AFAIK only WebRTC provides this functionality.
And info point: trying to transfer a movie file from iPhone SE (old) iOS 13.6.1 to Windows 10/Firefox 80.0.1 goes slow. According to task manager it goes about 10-15 Mbps. Using the VLC app network transfer on the same devices in the same network goes at 120 Mbps, so ten times faster.
I tried some transfers and here is the result of transfer speed: (File Size/Time Taken(Rough))
Wifi Router (2.4 Ghz) with connected android/windows: 1.8/9 mbps Android Hotspot (2.4 GHz) with Windows Connected to the hotspot: 3 mbps Android Hotspot (5 GHz) with Windows Connected to the hotspot: 5.5 mbps
Would maybe disabling chunking help? Or would that be unreliable?
Edit: I wonder also if the chunk size is just much too low? (it currently creates around 300 chunks for a small 20MB video which probably produces a big overhead already) https://github.com/RobinLinus/snapdrop/blob/78a8b167de8452bf852d2564b82d1ebda29d8653/client/scripts/network.js#L426 Maybe increasing it to 1MB would already help?
Can't reproduce with a 320MB file.
Can't reproduce with a 320MB file.
How fast is your transfer speed?
There is no obvious way to measure that but it was going reasonable fast. Maybe a half a minute or so.
half a minute (10MB/s) would still be slow for gigabit wi-fi networks which should be capable of at least around 30MB/s