Changeset 27652

Show
Ignore:
Timestamp:
18.06.2013 10:51:56 (6 years ago)
Author:
jmt12
Message:

Changing buffer to 128K (slightly faster) and adding a comment explaining the number of bytes we expect to be returned by read may be larger than buffersize due to encoding

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/parallel-building/trunk/src/perllib/FileUtils/HDThriftFS.pm

    r27591 r27652  
    7878my $debug = 0; 
    7979my $debug_encoding = 0; 
    80 # Testing shows 64k is pretty optimal 
     80# Testing shows 128k is pretty optimal 
    8181#my $buffer_length =    4 * 1024; # 4k blocks 
    8282#my $buffer_length =    8 * 1024; # 8k blocks 
     
    760760  open($fhout, '>:raw', $dst) or die("Failed to open file for writing: " . $dst); 
    761761  my $fhin = $thrift_client->open($src_path); 
     762  # Read buffer_length *decoded* bytes - which means there may be a larger 
     763  # number of *encoded* bytes returned 
    762764  while ($encoded = $thrift_client->read($fhin, $offset, $buffer_length)) 
    763765  {