I am writing an application for the Maemo platform using pygtk, and the tree view rendering speed seems to be a problem. Since the application is a media controller, I use transitional animations in the user interface. These animations move controls into view when moving around the user interface. The problem with the management tree is that it is slow.
Simply moving the widget around the middle of the screen is not so slow, but if the cells are displayed, the frame rate does drop. What makes this more annoying is that if the only area that is exposed is the title bar with line labels, the frame rate remains under control.
Judging by this, I suspect that the GTK tree view displays full cells again each time a single row of pixels is displayed. Is there a way to somehow force GTK to draw the entire widget into some buffer, even if parts of it are off-screen, and then use the buffer to draw the widget during animation?
Also, is there a difference between using Viewport and scrolling this area and using the Layout panel and moving the widget down? I would suggest that Viewport is faster, but I did not see any real difference when I tried both versions.
I understand that this is not necessarily what GTK was created for. Another alternative I tried is pygame, but I would prefer some sort of higher level implementation that has widget-based event handling built in. Pygtk also has the advantage of working in windows and windows, so development is easier.
source
share