[vtkusers] Rendering speed is window-size dependent?

Andrea Gavana andrea.gavana at gmail.com
Thu Jan 25 12:05:27 EST 2007


Hi all,

    I have been banging my head on a wall the whole day, and still
didn't come up with a solution. First, my configuration:

1) Windows XP, 2 GHz, 1GB RAM, good video card;
2) VTK CVS built 1 month ago;
3) Python 2.5;
4) wxPython 2.8.1.1

I am using wxVTKRenderWindowInteractor (but the same happens with
wxVTKRenderWindow) wrappers for Python/wxPython. I have tried to put
those windows in 4 different configurations:

1) Using MDI;
2) Using a notebook;
3) Using wxAUI (interface manager that lets you use a notebook-like container);
4) Using a splitter window.

I load a couple of 3D unstructured grids in 2 different
wxVTKRenderWindows: the grids have about 1 million points (hexahedron
cells, so I have about 100,000 cells in each one). Typical sizes for
those grids saved into a VTK ascii file is about 80 MB (including 1
scalar property).
Well, If my main application window (a wx.Frame) has small size (let's
say 400x400 pixels on a 1600x1200 pixels screen), I can easily switch
from one wxVTKRWI to another and interact with the mouse with a very
good response-time. But as soon as I maximize the main frame or I
resize it to bigger dimensions (let's say 1000x1000 pixels), the
repainting become sluggish, slow, and the mouse interaction is no more
possible (too slow).
I have tracked down the problem inside wxVTKRenderWindowInteractor:
the following call:

self._Iren.GetRenderWindow().Render()

Inside the Render() method takes 0.1 seconds when my frame has a small
size, but it takes more than 5 seconds when it is maximized
(self._Iren is a vtkGenericRenderWindowInteractor()), and the CPU goes
over infinity in this time interval.
I don't know how to reproduce it as I don't know if VTKData contains
datasets so big. Does anyone know if this is the case?
Am I hitting performance problems due to my PC configuration? Does
anyone have an idea on which could be the possible cause? Do you think
there are workarounds/solutions?

Thank you for every suggestion.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/



More information about the vtkusers mailing list