Bad performance on ARM architecture.
-
Hello,
I have decided to do my practice for final thesis in Qt. I have an embedded device on which I want to launch Qt. Specs:
CPU: Atmel ARM sama5d31
RAM: 256MB
OS: Lightweight version of latest debian
Does not include GPU chip.
Using X server to launch applications.Now when I was successful to cross compile Qt applications for mentioned embedded device I have to deal with a performace problem. Applications are really slow. I really thought that the main reason is that JIT is not enabled (so Quick and Quick2 should be slow) but event QWidget application is really slow (maybe like 5FPS).
Can anyone give me an advice how to deal with this problem? After launching the QWidget application there are a lot of free resources (CPU,RAM) on this board and still the application has really poor performance.
Thanks
-
Hello,
I have decided to do my practice for final thesis in Qt. I have an embedded device on which I want to launch Qt. Specs:
CPU: Atmel ARM sama5d31
RAM: 256MB
OS: Lightweight version of latest debian
Does not include GPU chip.
Using X server to launch applications.Now when I was successful to cross compile Qt applications for mentioned embedded device I have to deal with a performace problem. Applications are really slow. I really thought that the main reason is that JIT is not enabled (so Quick and Quick2 should be slow) but event QWidget application is really slow (maybe like 5FPS).
Can anyone give me an advice how to deal with this problem? After launching the QWidget application there are a lot of free resources (CPU,RAM) on this board and still the application has really poor performance.
Thanks
Hi, and welcome to the Qt Dev Net!
@sedlalu2 said in Bad performance on ARM architecture.:
I really thought that the main reason is that JIT is not enabled (so Quick and Quick2 should be slow)
Qt Quick uses OpenGL to draw shapes, particles, gradients, etc. so it relies on a GPU to run smoothly.
JIT shouldn't matter much, unless you implement lots of business logic in JavaScript.
but event QWidget application is really slow (maybe like 5FPS)
5 FPS of what? Updating a text label? Playing a video?
Please describe your application in more detail and show some code. Also, what version of Qt are you using?
-
Thanks for your quick reply.
I am using Qt5.8 beta, but I have also tried 5.7 without no succes. I am using autogenerated projects from QtCreator without any modifications (except in QWidget application I have created text input).
I know that OpenGL relies on GPU but I have heard about Mesa3D implementation which can be used without GPU. Is that true? Can I have Qt application based on Mesa3D to have fluid performace?
My application (QWidget even Quick example) was only simple text input application. When I want to edit my input it is lagging a lot. Also I am able to see two cursors - one is X cursor for sure which performs really great but the second one seems to be Qt cursor (?) which is lagging almost the same as editing the input area.
Is it possible to run Qt smoothly on architecture without GPU? How can I achieve it?
-
Thanks for your quick reply.
I am using Qt5.8 beta, but I have also tried 5.7 without no succes. I am using autogenerated projects from QtCreator without any modifications (except in QWidget application I have created text input).
I know that OpenGL relies on GPU but I have heard about Mesa3D implementation which can be used without GPU. Is that true? Can I have Qt application based on Mesa3D to have fluid performace?
My application (QWidget even Quick example) was only simple text input application. When I want to edit my input it is lagging a lot. Also I am able to see two cursors - one is X cursor for sure which performs really great but the second one seems to be Qt cursor (?) which is lagging almost the same as editing the input area.
Is it possible to run Qt smoothly on architecture without GPU? How can I achieve it?
@sedlalu2 said in Bad performance on ARM architecture.:
I know that OpenGL relies on GPU but I have heard about Mesa3D implementation which can be used without GPU. Is that true? Can I have Qt application based on Mesa3D to have fluid performace?
Mesa can use the CPU to draw graphics without a GPU, but that means you need a powerful CPU for fluid performance.
There is a better way: Use the Qt Quick 2D Renderer. See https://blog.qt.io/blog/2015/01/22/introducing-the-qt-quick-2d-renderer/ It was only available to commercial customers in Qt 5.7, but it is available to open-source users from Qt 5.8 onwards.
My application (QWidget even Quick example) was only simple text input application. When I want to edit my input it is lagging a lot. Also I am able to see two cursors - one is X cursor for sure which performs really great but the second one seems to be Qt cursor (?) which is lagging almost the same as editing the input area.
If it's a simple text input widget, then a small ARM device should be able to handle it smoothly...
The 2 cursors sounds very strange -- it seems like something has gone wrong with your installation. How did you install your OS and Qt?
This page says that the Atmel SAMA5 comes bundled with a Qt SDK: http://www.atmel.com/products/microcontrollers/arm/sama5.aspx What happens if you use that one instead of cross-compiling your own?
Is it possible to run Qt smoothly on architecture without GPU? How can I achieve it?
Yes, it is possible.
First, we need to figure out why you see 2 cursors.
By the way, Qt Quick and Qt Widgets have very different graphics technologies. Qt Widgets is older, and does not use any GPU.
-
I made a picture what my two cursors looks like (https://1drv.ms/i/s!Aln6DaiZz1x_lSWyxfWtZihwtyx9). It only happens when I have my mouse connected to the board otherwise (touch) it only uses the "X" cursor.
I really dont know anything about the OS installation process on this board. I just got that board from my teacher no idea how it was installed. But about my Qt it was configured with this command:
./configure -opengl es2 -optimized-qmake -no-pch -make libs -make tools -reduce-exports -sysroot /mnt/berta -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=/opt/develop/tools/gcc-arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -prefix /usr/local/berta -opensource -nomake examples -nomake tests -confirm-license -skip qtmultimedia -skip qtcharts -skip qtsensors -skip qtgamepad -skip qtmacextras -skip qtandroidextras -skip qtwayland
Thank you for Qt Quick 2D Renderer tip. It seems very useful. I have already tried to compile it by without any success. I downloaded this package: https://code.qt.io/cgit/qt/qtdeclarative-render2d.git and put it into my qt-everywhere-5.8 folder. Then I followed instruction in README about copying headers and libs to sysroot. But then I dont know how to cross compile it, when I try there are a lot of undefined references like errors so it seems like I've got wrong paths somewhere.
When Qt Widgets does not use any GPU then why is my application has such a bad performance?
-
Thank you for advices.
I finally managed to run Qt Quick 2 application with argument -platform linuxfb and it seems to work quite well.
@sedlalu2 said in Bad performance on ARM architecture.:
Thank you for Qt Quick 2D Renderer tip. It seems very useful. I have already tried to compile it by without any success. I downloaded this package: https://code.qt.io/cgit/qt/qtdeclarative-render2d.git and put it into my qt-everywhere-5.8 folder.
You're welcome.
In Qt 5.8, Qt Quick 2D Renderer is fully merged into Qt Quick itself. See http://blog.qt.io/blog/2016/08/15/the-qt-quick-graphics-stack-in-qt-5-8/ That means you don't need to compile it separately anymore
@sedlalu2 said in Bad performance on ARM architecture.:
Thank you for advices.
I finally managed to run Qt Quick 2 application with argument -platform linuxfb and it seems to work quite well.
That's good news indeed! (and out of curiosity: Does that mean the 2nd cursor is now gone?)
Please mark your post as "Solved".
Final advice: Qt 5.8 has not been released yet. It is still in Beta: http://blog.qt.io/blog/2016/11/04/qt-5-8-beta-released When it is fully released (hopefully before the end of 2016), I recommend you upgrade