PDA

View Full Version : Qt4, slow on windows ?



eto.ethome.sk
27th May 2009, 14:39
Hello,

I am completely new to this, and this is my first post here, so please don't bite me.

I have relatively lame machine, Athlon XP 14000 but with 3 GBs of RAM.
I also 25'' 16:10 LCD monitor with 1920x1200 resolution connected to this piece of junk.

What I want to say with all that, is that I know the processor is highly underpowered for such system.

After some time I learned how to spot when the app gets into CPU bound state on this machine. No swapping, everything gets just more slowly and you can see the culprit slowly drawing windows from top to bottom.

I downloaded QtSDK with QtCreator and when using it, I can literally see how the screen is painted, mostly when maximized. From examples I compiled so far, the spreadsheet is the worst. When maximized there is easily visible lag until parts of its window get refreshed in when uncovered by other applications.

I thought first, that this is caused by my lame point and click compiling with LGPL version of Qt, but I have Pencil and VLC player installed and after observing them thoroughly, I realized you can see the same happening with them, although on smaller scale.
Even when Pencil is pretty responsive when drawing to canvas, you can see same slowness and artifacts during the time you maximize it to fullscreen. Substantial lags can be detected in the mainwindow example too.

So I started running my pure windows apps and watch their behavior. Nor old Paint Shop Pro 6 nor Foobar2000 nor anything purely Win32 I use ( like Notepad++ ) is so slow compared to Qt from what I have tried, not even when maximised to fullscreen.

I would like to know whether there is a way to fix this? After talking with some people who told me Qt is the best (and those people seems to be really productive with it), I am reluctant to let it go. Yet unless you have fastest machine it's pretty slow. On this machine it is not so slow as for example Gtk (I use GIMP and Inkscape - you can even see buttons refreshing with tiny flicker) but still magnitude slower then plain Win32 applications.

Is this the price to pay for superior toolkit? Or it can be somehow recompiled to get same native acceleration even several years old applications (PSP 6) with plain Win32 are able to leverage. I've read something about Qt's graphics subsystems, is that right direction to look into?

georgep
27th May 2009, 17:38
Are you talking about software written in Qt and run on Windows ? If so, i have used far older machines than yours and they run just as fast as any other app. Absolutely no difference.

ps: nobody will bite you.

eto.ethome.sk
28th May 2009, 01:04
Could this be caused by the display resolution then? How come then that even when windows is small the effect is sometimes noticeable? I would really like to solve this.

wysota
28th May 2009, 01:34
You might try compiling with the microsoft compiler instead of MinGW (but this requires that you recompile Qt). It probably generates a better (faster?) code on Windows.

However bear in mind that shooting blind is not the best way to fix a problem. It might be better to check the actual usage of the cpu by the application and finding the bottleneck for your system using dedicated tools. I've seen Qt working on far inferior machines very well - there seems to be something broken on your system. An 1.5G Athlon is not a bad machine. Graphics is probably more important here, maybe that's your bottleneck.