Solved [Solved] Scrolling Text eating lot of CPU on beagleBone
-
@guru007 said in Scrolling Text eating lot of CPU on beagleBone:
text is refreshed at 100 times per second
this does not make sense as your display most probably cannot refresh so often (usually it is 60Hz). Actually it would be enough to refresh at 25Hz - this is what a human perceives as smooth.
-
@jsulm
But with even 30 fps it consuming whole processing Power. -
@guru007 Sorry, something went wrong here and I edited your last post. That wasn't intentionally.
You wrote before that the text can be very long. You should test with not so long text (but still long enough to need a scroll bar). Does it then still consume 100% CPU?
Qt widgets do not use hardware acceleration as far as I know (but QML does). Alternative would be to use http://doc.qt.io/qt-5/graphicsview.html -
@jsulm Everything is back on track. I still had the email from the thread :)
-
@SGaist Thanks!
-
@jsulm How can I check If my application uses GPU for rendering. I read from stackoverflow:
Qt doesn't magically GPU-accelerate the entire application. Widgets are not accelerated unless they derive from QOpenGLWidget. Qt Quick 2 is accelerated by default; there's an option of using the software renderer on hardware that doesn't support OpenGL ES 2. Qt Quick 1 is accelerated if you set a QOpenGLWidget as a viewport on the QGraphicsView.
Could you suggest some already built app to test gpu? Some Demo app
-
@guru007 If you use widgets there is nothing to check as those do not use GPU.
-
@jsulm So which Qt Demo example I can use to test Gpu acceleration?
thanks
-
@guru007 Again: you're currently using widgets! Widgets do not use GPU - what do you want to check?
If you're planning to switch to QML, then take one of QML/QtQuick examples. -
@jsulm Now I am also talking about Qml. I think colliding mice is right example to test.
Am I right dear? -
@guru007 Should be fine
-
problem is solved by using QgrpahicsView with Qimage.
I draw text on QImage And Display it in QGraphicScene.
Cpu usage decreased to 45 % .
Thanks for ur replies.