From eb9902ad7e84adecc494c4813286336d5f8cbbd0 Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Fri, 7 Dec 2018 00:35:26 +0000 Subject: [PATCH] Change the amount of data that Platform::PutFile will try to transfer in one packet from 1k bytes to 16k bytes. Sending a large file to an iOS device directly connected by USB cable, to lldb-server running in platform mode, this speeds up the file xfer by 77%. Sending the file in 32k blocks speeds up the file xfer by 80% versus 1k blocks, starting with 16k to make sure we don't have any problems with android testing. We may not have the same perf characteristics over ethernet, but with USB it's faster to send fewer larger packets than many small packets. llvm-svn: 348557 --- lldb/source/Target/Platform.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp index c678ded..8d7a889 100644 --- a/lldb/source/Target/Platform.cpp +++ b/lldb/source/Target/Platform.cpp @@ -1296,7 +1296,7 @@ Status Platform::PutFile(const FileSpec &source, const FileSpec &destination, return error; if (dest_file == UINT64_MAX) return Status("unable to open target file"); - lldb::DataBufferSP buffer_sp(new DataBufferHeap(1024, 0)); + lldb::DataBufferSP buffer_sp(new DataBufferHeap(1024 * 16, 0)); uint64_t offset = 0; for (;;) { size_t bytes_read = buffer_sp->GetByteSize(); -- 2.7.4