Skip to content

Commit

Permalink
increase read chunk size from 1 KB to 4 MB
Browse files Browse the repository at this point in the history
Otherwise running command below as part of nc_test/run_inmemory.sh can
be very slow
    ./tst_diskless4 500000000 opendiskless
  • Loading branch information
wkliao committed Apr 30, 2022
1 parent f37313d commit 19284a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libdispatch/dutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ NC_readfileF(FILE* stream, NCbytes* content, long long amount)
{
int ret = NC_NOERR;
long long red = 0;
char part[1024];
char part[4194304];

while(amount < 0 || red < amount) {
size_t count = fread(part, 1, sizeof(part), stream);
Expand Down

0 comments on commit 19284a3

Please sign in to comment.