aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/lib
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-04-20 10:16:03 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-04-20 10:19:07 -0700
commita749a6b95932d6f7438a01a2f5fd661343ad536f (patch)
tree921fed22f5aa69e0fd32ee175775f1c0950c8d3a /tensorflow/python/lib
parentfb23c0e166179ccf372203982d8fe79de441e360 (diff)
Change the TF record reader to use 16MB buffering by default in order to improve performance.
PiperOrigin-RevId: 193685521
Diffstat (limited to 'tensorflow/python/lib')
-rw-r--r--tensorflow/python/lib/io/py_record_reader.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/tensorflow/python/lib/io/py_record_reader.cc b/tensorflow/python/lib/io/py_record_reader.cc
index 5fcb51b3b2..9500fc6a7c 100644
--- a/tensorflow/python/lib/io/py_record_reader.cc
+++ b/tensorflow/python/lib/io/py_record_reader.cc
@@ -43,9 +43,10 @@ PyRecordReader* PyRecordReader::New(const string& filename, uint64 start_offset,
reader->offset_ = start_offset;
reader->file_ = file.release();
+ static const uint64 kReaderBufferSize = 16 * 1024 * 1024;
RecordReaderOptions options =
RecordReaderOptions::CreateRecordReaderOptions(compression_type_string);
-
+ options.buffer_size = kReaderBufferSize;
reader->reader_ = new RecordReader(reader->file_, options);
return reader;
}