[adb] Speed up the streaming install
1. Use bigger buffer for transfers - 64kb is the default size
for push, so let it be the same in streaming
2. Use abb when it's available for lower overhead
3. Add a posix_fadvise() on the source APK
4. Increase buffer sizes for the socketpair that's transferring
the data from adbd.
Overall this saves about 25% time for streaming installations
and makes it faster than the legacy push (at last!)
Test: manual
Change-Id: Ieb84284da2058944815e062ef6e4389b842565fa
diff --git a/adb/client/commandline.cpp b/adb/client/commandline.cpp
index 3c03eb2..4eb4eb4 100644
--- a/adb/client/commandline.cpp
+++ b/adb/client/commandline.cpp
@@ -355,7 +355,7 @@
}
void copy_to_file(int inFd, int outFd) {
- std::vector<char> buf(32 * 1024);
+ std::vector<char> buf(64 * 1024);
int len;
long total = 0;
int old_stdin_mode = -1;