Increase packager input/output file buffers to 2MB
Increases the read/write buffers for packager input and output files to 2MB from 256KB, which helps throughput when using network file systems. Change-Id: Iff5d1b796ba4648f1436e0559c0ca2d353b6c4b5
This commit is contained in:
parent
cf0a1878f7
commit
26a4969ea2
|
@ -23,7 +23,7 @@
|
||||||
namespace {
|
namespace {
|
||||||
const size_t kInitBufSize = 0x4000; // 16KB, sufficient to determine the
|
const size_t kInitBufSize = 0x4000; // 16KB, sufficient to determine the
|
||||||
// container and likely all init data.
|
// container and likely all init data.
|
||||||
const size_t kBufSize = 0x40000; // 256KB.
|
const size_t kBufSize = 0x200000; // 2MB
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace edash_packager {
|
namespace edash_packager {
|
||||||
|
|
|
@ -107,7 +107,7 @@ Status SingleSegmentSegmenter::DoFinalize() {
|
||||||
"Cannot open file to read " + temp_file_name_);
|
"Cannot open file to read " + temp_file_name_);
|
||||||
}
|
}
|
||||||
|
|
||||||
const int kBufSize = 0x40000; // 256KB.
|
const int kBufSize = 0x200000; // 2MB.
|
||||||
scoped_ptr<uint8_t[]> buf(new uint8_t[kBufSize]);
|
scoped_ptr<uint8_t[]> buf(new uint8_t[kBufSize]);
|
||||||
while (!temp_file->Eof()) {
|
while (!temp_file->Eof()) {
|
||||||
int64_t size = temp_file->Read(buf.get(), kBufSize);
|
int64_t size = temp_file->Read(buf.get(), kBufSize);
|
||||||
|
|
Loading…
Reference in New Issue