PairDrop icon indicating copy to clipboard operation
PairDrop copied to clipboard

Bug: transfers are incredibly slow

Open nealhead opened this issue 2 years ago • 17 comments

Attempting to transfer a file between clients is unimaginably slow

Steps to reproduce the behavior:

  1. Go to pairdrop.net
  2. Click on link in top right
  3. Pair with device
  4. Transfer file

Expected behavior I expect the speed of the connection between the two devices

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser Edge, Firefox
  • Version 110.0.1587.50,110

Self-Hosted Both self-hosted and Pairdrop official site

Self-Hosted Setup Proxy: Nginx Deployment: Unraid

Additional context Add any other context about the problem here.

nealhead avatar Feb 22 '23 18:02 nealhead

I tested on two different browsers on the same PC and still experienced the slow speeds

nealhead avatar Mar 01 '23 18:03 nealhead

Is this still the case for you? Have you done some additional testing? Have you tried hosting your own instance?

schlagmichdoch avatar Mar 25 '23 02:03 schlagmichdoch

Same for me. Tried to send a 200MB video but it was indeed incredibly slow. Devices are on the same network. Any way I can tell if it's using a direct connection or if it's trying to use the public turn server?

chadoe avatar Apr 07 '23 22:04 chadoe

I have since added a new TURN server for pairdrop.net that should increase the transfer speed. Could you try again @chadoe @nealhead ?

schlagmichdoch avatar Apr 18 '23 11:04 schlagmichdoch

I have since added a new TURN server for pairdrop.net that should increase the transfer speed. Could you try again @chadoe @nealhead ?

Sorry but the speed is still very slow (about 2M/s even 500k/s) although I am using my mobile's hotspot (wifi6 5ghz).

cxzlw avatar May 25 '23 17:05 cxzlw

Thanks for reporting! The slow speed is browser specific as the bottleneck is the webrtc implementation. I will play around with the code to try to increase the webrtc bandwidth and keep you updated.

schlagmichdoch avatar May 25 '23 19:05 schlagmichdoch

Same here, pairdrop.net and self-hosted docker transfer from mobile to desktop and other devices getting capped at 300-400KB/s.

I tested on another app called sharedrop.io and got full speed of the device connection. I looked around at their code seems like something to do with the webrtc chunks setting https://github.com/szimek/sharedrop/blob/master/app/services/web-rtc.js

I prefer pairdrop ui/ux over others, hope the speed issue can be resolved.

jeremyjohn avatar Sep 24 '23 16:09 jeremyjohn

Same here, pairdrop.net and self-hosted docker transfer from mobile to desktop and other devices getting capped at 300-400KB/s.

I tested on another app called sharedrop.io and got full speed of the device connection. I looked around at their code seems like something to do with the webrtc chunks setting https://github.com/szimek/sharedrop/blob/master/app/services/web-rtc.js

I prefer pairdrop ui/ux over others, hope the speed issue can be resolved.

Yeah, and I am using LocalSend. You may want to have a try because of its ui.

:)

cxzlw avatar Sep 24 '23 16:09 cxzlw

Same here, pairdrop.net and self-hosted docker transfer from mobile to desktop and other devices getting capped at 300-400KB/s.

I tested on another app called sharedrop.io and got full speed of the device connection. I looked around at their code seems like something to do with the webrtc chunks setting https://github.com/szimek/sharedrop/blob/master/app/services/web-rtc.js

I prefer pairdrop ui/ux over others, hope the speed issue can be resolved.

Yeah, and I am using LocalSend. You may want to have a try because of its ui.

:)

And high speed

cxzlw avatar Sep 24 '23 16:09 cxzlw

The following comments were deleted by GitHub (via hubot) as part of mistakenly marking this account as spam on 17th February 2024. The correct thread order and the creation date is unclear. I decided to manually restore them anyway in order to complete the information this issue holds even though the restored information might be outdated:

Comment by @schlagmichdoch:

Does this only happen on paired devices? Devices that are behind a NAT need a TURN server to establish the peer-to-peer connection. Apparantly the public turn server is quite slow.

Try this to bypass the need for a TURN server: https://github.com/schlagmichdoch/PairDrop/blob/master/docs/faq.md#transferring-many-files-with-paired-devices-takes-too-long

If you self-host you can also run your own stun and turn server which should increase the speed a lot if done right. See this issue for more info: #32

schlagmichdoch avatar Apr 30 '24 16:04 schlagmichdoch

I have the same issue, regardless of using my selfhosted instance or the official pairdrop.net site. My wifi should be able to push Gigabit speed, yet a simple file transfer of 260MB took about 10 minutes, which is just painfully slow

jmaximusix avatar May 29 '24 10:05 jmaximusix

Hello. I'm tested it on local own server with devices connected via local network and i can says it have extremely slow transfer.

ksweidmann avatar Jun 03 '24 18:06 ksweidmann

I have rewritten the file chunker and digester code which was written for Snapdrop and had indeed some flaws.

With these changes I could transfer a 1.5GB file from Ubuntu Firefox to iOS Safari on the same network with speeds up to 15 MB/s.

An instance is ready for testing if anyone wants to give it a try: https://pairdrop-dev.onrender.com/

Known issue: When receiving a file on mobile, the filename is incorrect when using the share menu.

schlagmichdoch avatar Jul 17 '24 16:07 schlagmichdoch

With these changes I could transfer a 1.5GB file from Ubuntu Firefox to iOS Safari on the same network with speeds up to 15 MB/s.

Here Pairdrop gets < 3MB/s while Localshare gets ~10MB/s.

trmdi avatar Jul 19 '24 02:07 trmdi

As long as we don't have native clients (see #292) we are bound by the abilities of browsers as their WebRTC implementation is the current bottleneck for transfer speeds. On the contrary, LocalSend only ships native applications and benefits by having higher transfer speeds.

To compare PairDrop to LocalSend is only to some extent useful as both have their respective strengths. For PairDrop that's definitely "No setup. No signup.". It runs in the browser without the need to install anything which makes it usable on almost every device. Additionally, there is its universality, as you can use it in many scenarios and most network configurations (same network, different networks, mobile data etc.). You do not need to be on the same network and it still works the same.

For PairDrop it depends on the browsers and devices that are used. As browsers are restricted by the OS, enabling/disabling the Power Saver Mode might also make a difference for transfer speeds.

After this release I guess I will start to implement #292 to increase the transfer speed further for users who are willing to install an app. With this we would probably get to much higher speeds.

I would appreciate if someone else could test if everything still works as expected.

schlagmichdoch avatar Jul 19 '24 14:07 schlagmichdoch

I mean is there anything else that could be improved e.g. multi-thread transferring?

trmdi avatar Jul 21 '24 01:07 trmdi

Slower than https://www.ppzhilian.com/ and https://fastsend.ing/

An instance is ready for testing if anyone wants to give it a try: https://pairdrop-dev.onrender.com/

Amazing! Much faster than current one, but not quite stable, seems the speed slow down in the middle of tranfer process, while speed up in the tail.

flashlab avatar Aug 01 '24 05:08 flashlab