snapdrop icon indicating copy to clipboard operation
snapdrop copied to clipboard

Extremely slow?

Open MulleDK19 opened this issue 5 years ago • 11 comments

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?

MulleDK19 avatar Apr 12 '20 19:04 MulleDK19

I want to know this as well. Came here for this.

ThinkDigitalSoftware avatar Jul 08 '20 03:07 ThinkDigitalSoftware

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.

PaulSzymanski avatar Jul 12 '20 20:07 PaulSzymanski

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

ThinkDigitalSoftware avatar Jul 12 '20 21:07 ThinkDigitalSoftware

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.

PaulSzymanski avatar Jul 13 '20 09:07 PaulSzymanski

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.

xerces8 avatar Sep 01 '20 16:09 xerces8

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

RuthlessRuler avatar Dec 12 '21 12:12 RuthlessRuler

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?

szaimen avatar Dec 15 '21 16:12 szaimen

Can't reproduce with a 320MB file.

SuperSandro2000 avatar Dec 18 '21 04:12 SuperSandro2000

Can't reproduce with a 320MB file.

How fast is your transfer speed?

szaimen avatar Dec 19 '21 12:12 szaimen

There is no obvious way to measure that but it was going reasonable fast. Maybe a half a minute or so.

SuperSandro2000 avatar Dec 19 '21 22:12 SuperSandro2000

half a minute (10MB/s) would still be slow for gigabit wi-fi networks which should be capable of at least around 30MB/s

szaimen avatar Dec 19 '21 23:12 szaimen