Skip to content

Commit 2708fda

Browse files
committed
Increase read buffer to reduce total syscalls
1 parent b3b3084 commit 2708fda

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

libs/libpugiutil/src/pugixml_loc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void loc_data::build_loc_data() {
3030

3131
std::ptrdiff_t offset = 0;
3232

33-
char buffer[1024];
33+
char buffer[1048576];
3434
std::size_t size;
3535

3636
while ((size = fread(buffer, 1, sizeof(buffer), f)) > 0) {

libs/libvtrutil/src/vtr_digest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ std::string secure_digest_stream(std::istream& is) {
2121
//Read the stream in chunks and calculate the SHA256 digest
2222
picosha2::hash256_one_by_one hasher;
2323

24-
std::array<char, 1024> buf;
24+
std::array<char, 1048576> buf;
2525
while (!is.eof()) {
2626
//Process a chunk
2727
is.read(buf.data(), buf.size());

0 commit comments

Comments
 (0)