PDA

View Full Version : Severe GraphicsView Scrolling Performance Regression in 4.4



pherthyl
20th May 2008, 15:58
Hi everyone..

I've got a view/scene with some simple items, where the scene is of a fixed size and the view has scrollbars.

I'm just investigating moving to 4.4, but when I build my application against it, scrolling the view becomes extremely slow. Even with no items on the scene at all, scrolling saturates the CPU and is very choppy. The exact same application built against 4.3.4 is silky smooth.

I have a background being drawn (very simple white rectangle with a border the size of the scenerect), but I've enabled background caching, so that shouldn't be a problem.

Both builds of Qt (4.4 and 4.3.4) are built with the exact same configure flags (-static and -release, as well as a few other flags for including/excluding modules I need).

Anyone else experienced this or have any ideas where to start investigating?

Update: I've since tried this on another computer with the same results. And this is Windows.

Bitto
20th May 2008, 18:29
Yikes! Can you please post a compilable example that shows this slow-down? You should also consider posting this directly to http://trolltech.com/developer/task-tracker .

pherthyl
20th May 2008, 21:24
Ok. I'll work on trying to make a small example and narrowing it down a bit more. It seems to be a Windows issue. I can't reproduce it on Linux.

pherthyl
21st May 2008, 05:10
Ok, I found the problem. Setting setCacheMode(QGraphicsView::CacheBackground); on the graphicsview causes severely degraded scrolling performance in Qt 4.3. If I disable that flag, scrolling (by dragging the scrollbars) still mostly saturates the CPU, but at least it's smooth. Will post the issue to trolltech.

pherthyl
21st May 2008, 05:18
Minimum compilable example attached. It makes sense that caching would slow down scrolling (since I assume it has to recreate the cache) but I never had a problem with it on 4.3.4