Why is transmitting a file locally through AirDroid slower than downloading it from the internet? I have a video file on my Android device (One Plus 7 Pro). I use the app AirDroid to download this file to my desktop computer through a web browser or application on the computer. This all happens locally, I can cut the internet connection in the middle of the transfer and it will not impede the transfer.

I find that this transfer is slower than I would expect. The fastest speed I have been able to achieve is 6 megabytes per second, which I only achieve when I host a hotspot with my phone, and connect the desktop to that.

If I connect both the phone and the desktop to a WiFi router, I only get roughly half that speed.

Both these devices are capable of both uploading and downloading data much faster than this. If I connect them to a sufficiently fast internet connection through WiFi, they can upload and download files from and to the Internet at multiple times the speeds mentioned above.

If their hardware are capable of that when transmitting to/from the Internet, why can they not do the same thing locally? I would assume that having removed the bottleneck of the Internet connection, the speed would be much faster.

I have noticed that this speed limitation also occurred with other apps that did similar things, such as ShareIt. I have also noticed it a multitude of Android devices from various brands, and various computers.
If I connect both the phone and the desktop to a WiFi router, I only get roughly half that speed.


This is because of the way a Wifi network works. If you transmit data from one Wifi device to a second Wifi device connected to the same Wifi network (using the Wifi frequency and the router does not support MIMO) the data will be always transmitted this way (defined by the Wifi standard):

device 1 -> Wifi router -> device 2

Therefore each packet has to be transmitted twice over the air and in your Wifi only one device can be active (sending or receiving data) at a time. 
It looks like the limiting factor in your set-up is the Wifi transmission speed. Both devices seem to use the same Wifi frequencies and therefore can not communicate at the same time but alternating. Therefore you only get the half speed.

This situation would not occur if your Wifi would support one of the following techniques:


The Wifi works in both 2.4GHz and 5GHz mode (and one device supports 5GHz Wifi)
The router has multiple antennas and can use antenna diversity (MU-MIMO) so that multiple devices can communicate at the same time


Alternatively there would be the possibility to use a WiFi Direct connection. It does not involve the router, therefore the connection should be up to twice as fast. But I don't have any experience with such a connection and AirDroid.