MantisBT - ParaView
View Issue Details
0009289ParaViewBugpublic2009-07-20 22:162009-10-02 14:51
Alan Scott 
Zhanping Liu 
highminoralways
closedfixed 
 
3.6.23.6.2 
0009289: EnSight case file reader gets SLOW when you read multiple timesteps
I have a file that seems to get slower the further you read in the timesteps. There are 500 timesteps in this file, and it is about 2 gbytes in size. All timesteps should read at the same speed.

EnSight doesn't seem to have this problem.

Ask me for this file. particle.case.
No tags attached.
Issue History
2009-07-20 22:16Alan ScottNew Issue
2009-09-03 21:01Utkarsh AyachitStatusbacklog => tabled
2009-09-03 21:01Utkarsh AyachitAssigned To => Zhanping Liu
2009-09-05 08:52Ken MorelandTarget Version => 3.6.2
2009-09-08 16:38Alan ScottNote Added: 0017346
2009-09-08 16:56Alan ScottPrioritynormal => high
2009-09-22 11:11Zhanping LiuNote Added: 0017703
2009-09-22 11:12Zhanping LiuStatustabled => @80@
2009-09-22 22:06Alan ScottNote Added: 0017721
2009-09-22 22:06Alan ScottStatus@80@ => @20@
2009-09-22 22:06Alan ScottResolutionopen => reopened
2009-09-23 09:50Zhanping LiuNote Added: 0017729
2009-09-23 09:51Zhanping LiuStatus@20@ => @80@
2009-09-28 14:49Utkarsh AyachitNote Added: 0017799
2009-09-28 14:50Utkarsh AyachitFixed in Version => 3.6.2
2009-09-28 14:50Utkarsh AyachitResolutionreopened => fixed
2009-10-02 14:51Alan ScottNote Added: 0017911
2009-10-02 14:51Alan ScottStatus@80@ => closed

Notes
(0017346)
Alan Scott   
2009-09-08 16:38   
I am having my analyst create a reasonably size dataset. Ask me for it when you start working on this problem. This is an ascii case file type dataset, which does not exist in the ParaView or VTK datasets.

The issue is found in file vtkEnSightGoldReader.cxx, starting at line 123, in the following code:
  if (this->UseFileSets)
    {
    for (i = 0; i < timeStep - 1; i++)
      {
      while (strncmp(line, "END TIME STEP", 13) != 0)
        {
        this->ReadLine(line);
        }
      this->ReadLine(line);
      }
    
    while(strncmp(line, "BEGIN TIME STEP", 15) != 0)
      {
      this->ReadNextDataLine(line);
      }
    this->ReadLine(line);
    }

For every timestep, the code opens a file pointer (earlier in the function), starts at time step 0, and steps to the desired time step, and finally closes the pointer. This is an N-squared type operation. What is desired is to not close this file between time steps, and if we have already found a time step, start looking from there for the next one. This should change to an N type operation. This should significatly speed up "play animations" and "save animations".

Ask Utkarsh for implementation details - we went through the code together, and he has some ideas.
(0017703)
Zhanping Liu   
2009-09-22 11:11   
This problem was fixed. Now multiple successive (unnecessarily immediately successive as long as in forward order) time steps in the same geometry file can be rapidly loaded.

Changes were made to

VTK/IO/vtkEnSightReader.h
new revision: 1.37; previous revision: 1.36

VTK/IO/vtkEnSightGoldReader.cxx
new revision: 1.67; previous revision: 1.66

VTK/IO/vtkEnSightReader.cxx
new revision: 1.85; previous revision: 1.84

Thanks.
(0017721)
Alan Scott   
2009-09-22 22:06   
Need to get rid of a print statement - it says "Executing with:" ... Then, just mark it closed.
(0017729)
Zhanping Liu   
2009-09-23 09:50   
As suggested, "Executing with:" was removed.

new revision: 1.87; previous revision: 1.86
(0017799)
Utkarsh Ayachit   
2009-09-28 14:49   
Committed to 3.6.2

/cvsroot/ParaView3/ParaView3/VTK/IO/vtkEnSightGoldReader.cxx,v <-- VTK/IO/vtkEnSightGoldReader.cxx
new revision: 1.65.6.1; previous revision: 1.65
/cvsroot/ParaView3/ParaView3/VTK/IO/vtkEnSightReader.cxx,v <-- VTK/IO/vtkEnSightReader.cxx
new revision: 1.84.6.1; previous revision: 1.84
/cvsroot/ParaView3/ParaView3/VTK/IO/vtkEnSightReader.h,v <-- VTK/IO/vtkEnSightReader.h
new revision: 1.36.8.1; previous revision: 1.36

/cvsroot/ParaView3/ParaView3/VTK/IO/vtkEnSightReader.cxx,v <-- VTK/IO/vtkEnSightReader.cxx
new revision: 1.84.6.2; previous revision: 1.84.6.1

/cvsroot/ParaView3/ParaView3/VTK/IO/vtkEnSightReader.cxx,v <-- VTK/IO/vtkEnSightReader.cxx
new revision: 1.84.6.3; previous revision: 1.84.6.2
(0017911)
Alan Scott   
2009-10-02 14:51   
Excellent. Tested local server, XP.