Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dadb/src/main/kotlin/dadb/AdbSync.kt
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ class AdbSyncStream(
writeFrameHeader(DATA, read.toInt())
val sent = writeAll(this@AdbSyncStream.buffer)
check(read == sent)
flush()
// 优化:不要每 64KB 就 flush,让 BufferedSink 自动缓冲合并,
// 减少网络发送次数,提升传输速度
}
}
stream.sink.apply {
Expand Down