-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why wireless is so slow? #495
Comments
Probably TCP head-of-line blocking. When a packet is lost, the whole stream will wait until it is retransmited.
In the end, it does not loose data, but to do that it waits for retransmissions. If there are too many packet lost, your bandwidth will be smaller than your video stream. You should try to reduce the bitrate/definition:
|
Thank you for your input! I've eliminated "adb forward" from the chain by implementing direct connect from desktop to ServerSocket, disabled SKIP_FRAMES, tuned socket parameters, and my experience over Wi-Fi is much better now. It is the same with 2 or 8M. |
Which ones? |
setSendBufferSize to 2MB. I also use SocketChannel to write ByteBuffer without additional layers. I wish I'll find some time to publish the changes one day... So far:
|
Hi, |
@Lurker00 post patch pls |
Sorry, I was in trouble with this project: I've damaged the computer used for development, and only recently purchased a new one and restored the environment. Currently I've forked this project, and merged all my changes into the official 1.9 version. It is there. I only have Android 8.1 devices, so I'm not sure that all my changes will work for all. It requires additional app (my dirty build of ADBKeyBoard) to type any language and to sync device's orientation by PC. In general, I'm not sure should I try a pull request... But you may build both projects yourself and give it a try... The full list of my changes (sorry for misuse this thread!):
Internals:
|
For what it's worth, the following command line arguments seem to help with performance over WiFi:
The 200 millisecond buffer delay along with decreasing the display dimension from 1920 to 960 using the -m 960 option seem to help a lot. |
I've tried wireless connection (Android device as Wi-Fi access point, 5GHz, Windows laptop as a network client) via "adb connect". Obviously, "adb reverse" does not work, but "adb forward" works.
The result is very slow display update. It even looses frames and events. Why it is so? As I understand, it is TCP which shall not loose any data, and 8Mbps stream shall not be a problem for direct WiFi connection at 5GHz, when devices are side by side. Miracast works just fine.
I've tried wired "adb forward" and didn't notice any performance drop. Also, from the source code I don't see any difference between reverse and forward after the connection has been established.
Any idea on how to improve wireless connection? I don't ask for any action, only for information :)
The text was updated successfully, but these errors were encountered: