PDA

View Full Version : SameGame QtQuick2 Demo App is Resource Hungry!?



gemmell
23rd January 2013, 00:06
Hi all,

I'm evaluating whether we move some of our GUI over to QML/QtQuick2 when we move to Qt 5.0.0. As a part of this I built samegame (C:\Qt\qt-everywhere-opensource-src-5.0.0\qtdeclarative\examples\quick\demos\samegame - Obviously I'm on Windows).

Running it on my Dell M17x R2 (i7 X920 4 cores @ 2GHz) it takes 12-13% of my CPU (which is an entire hyperthreaded core) and 80% of my GPU (according to GPU-Z). It's not exactly doom3 graphics, so what's so terrible about it? It's doing this even on the menu screen!

In terms of a demonstration, this has really scared me. Is it that the samegame needs some tweaks (frame rate limiting?)? Maybe QtQuick2 needs some tweaks? We've tried it on 3 computers and it's been a bit of a hog on all 3. Building with MSVC2010 and with -opengl desktop configure flag.

Can anyone provide some explanation or guidance?

Regards,
Simon
PS. I haven't had a chance to look at whether it's just looping as fast as it can or anything like that - just throwing out the question to see if anyone else has noticed. Either way it's not the best demonstration for a new technology - Look at how resource hungry our new tech is!

wysota
23rd January 2013, 11:37
SameGame does some calculations related to the particle engine. However not that much as you report. On my machine (Linux x64 + NVIDIA + 6 core AMD CPU) the game is using practically 0 CPU power in menu and about 15% (where 100% means one core out of six is satitated) while playing. I'd assume there is something wrong with your machine setup (OpenGL drivers maybe?).

gemmell
23rd January 2013, 12:23
Or windows or compiling with MSVC.

wysota
23rd January 2013, 12:45
No, I doubt that's the problem. Windows with MSVC is tier1 platform for Qt5. It has been heavily tested and I'm sure such erroneous behaviour would come out during tests.

gemmell
23rd January 2013, 22:46
I asked a friend of mine to test it out, see if it was just me or my machine. Below are some emails I received:

Email1:
Well I manage to get 16.7% CPU which may mean its using a core and a bit or turbo boost is making the numbers weird and 6% - 20% GPU.

And even dragging the window round the screen seems jumpy. Does not seem good at all.
That's was vs2010. I have found that mingw does worse than visual studio in terms of perfomance and threads also don't seem to work correctly with mingw.

The specs for the computer are:
i7 2600k @ 4.85ghz
NVIDIA 570 gtx
Windows 8 pro 64 bit
Qt 5 64 bit dynamic


Email2:
I just built it at work using the qt5 from the commercial installer and it uses no CPU at all.

The only difference i can think of is that the installed version uses ANGLE.

Email3:
Just tried with vs2012 and its the same as 2010

wysota
23rd January 2013, 23:03
The only difference i can think of is that the installed version uses ANGLE.
That would suggest problems with OpenGL drivers.

gemmell
29th January 2013, 23:30
Agreed that it sounds like OpenGL drivers, however the performance has been poor on every single computer I've tried it on (currently 4). The machine I'm currently on supports OpenGL 3.3 (according to OpenGl Extension Viewer) and has relatively recent drivers.

So the question needs to go out to a wider audience:
Has anyone built Qt for windows with -opengl Desktop and have samegame NOT consume ridiculous amounts of resources?