[Kst] branches/work/kst/portto4/kst/src/datasources/ascii

Peter Kümmel syntheticpp at gmx.net
Wed Oct 17 07:54:59 UTC 2012


SVN commit 1320843 by kuemmel:

use frame buffer limit as sliding window size

 M  +1 -2      asciifilebuffer.cpp  
 M  +1 -1      asciifilebuffer.h  
 M  +1 -1      asciisource.cpp  


--- branches/work/kst/portto4/kst/src/datasources/ascii/asciifilebuffer.cpp #1320842:1320843
@@ -201,13 +201,12 @@
 }
 
 //-------------------------------------------------------------------------------------------
-void AsciiFileBuffer::readFileSlidingWindow(const RowIndex& rowIndex, int start, int bytesToRead, int maximalBytes)
+void AsciiFileBuffer::readFileSlidingWindow(const RowIndex& rowIndex, int start, int bytesToRead, int chunkSize)
 {
   clear();
   if (!_file)
     return;
 
-  int chunkSize = _defaultChunkSize;
   _fileData = splitFile(chunkSize, rowIndex, start, bytesToRead);
   _bytesRead = 0;
   AsciiFileData master;
--- branches/work/kst/portto4/kst/src/datasources/ascii/asciifilebuffer.h #1320842:1320843
@@ -35,7 +35,7 @@
   void readWholeFile(const RowIndex& rowIndex, int start, int bytesToRead, int numChunks, int maximalBytes = -1);
   const QVector<AsciiFileData>& data() const; // -> wholeFile();
   
-  void readFileSlidingWindow(const RowIndex& rowIndex, int start, int bytesToRead, int maximalBytes = -1);
+  void readFileSlidingWindow(const RowIndex& rowIndex, int start, int bytesToRead, int chunkSize);
   void readFileSlidingWindow(const RowIndex& rowIndex, int start, int bytesToRead, int chunkSize, int numSubChunks);
 
   const QVector<QVector<AsciiFileData> >& slidingWindow() const { return _slidingWindow; }
--- branches/work/kst/portto4/kst/src/datasources/ascii/asciisource.cpp #1320842:1320843
@@ -281,7 +281,7 @@
       if (_config._useThreads) {
         _fileBuffer.readFileSlidingWindow(_reader.rowIndex(), begin, bytesToRead, _config._limitFileBufferSize, numThreads);
       } else {
-        _fileBuffer.readFileSlidingWindow(_reader.rowIndex(), begin, bytesToRead);
+        _fileBuffer.readFileSlidingWindow(_reader.rowIndex(), begin, bytesToRead, _config._limitFileBufferSize);
       }
     } else {
       _fileBuffer.readWholeFile(_reader.rowIndex(), begin, bytesToRead, numThreads);


More information about the Kst mailing list