Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QGIS 3D uses a lot of CPU even when idle #25390

Closed
qgib opened this issue Nov 18, 2017 · 9 comments · Fixed by #42297
Closed

QGIS 3D uses a lot of CPU even when idle #25390

qgib opened this issue Nov 18, 2017 · 9 comments · Fixed by #42297
Labels
3D Relates to QGIS' 3D engine or rendering Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@qgib
Copy link
Contributor

qgib commented Nov 18, 2017

Author Name: Klas Karlsson (@klakar)
Original Redmine Issue: 17493
Affected QGIS version: master
Redmine category:3d


As soon as I open a 3D window, my fans in the computer winds up. Even if i do nothing more, they stay on, and CPU load increase a lot.

As soon as I close the 3D window, CPU load returns to normal.

This is not a "crashing" issue, or a "freezing" issue. It's just annoying that it can "steal" this much resources just by opening a window in QGIS.

It doesn't seem to matter what layers are active or involved, resources spike no matter what.

Tested on Windows10 and Linux (Manjaro)

@qgib
Copy link
Contributor Author

qgib commented Nov 22, 2017

Author Name: Martin Dobias (@wonder-sk)


On my machine the 3D view keeps one CPU core completely busy, so yes it is normal that the CPU fan needs to be started. The rendering is done with the target of 60 frames per second (that's fixed in Qt 3D) - even if the scene is static - and Qt 3D has some work to do for each frame. QGIS does not get involved much there unless you move the camera which may trigger scene updates. I assume that over time with more optimizations in Qt 3D the CPU usage will get better.

There is also an option to use on-demand 3D frame rendering instead of trying to maintain 60fps all the time - however with that option I got even higher CPU usage... so maybe I did something wrong there or it is/was a bug: https://github.com/qgis/QGIS/blob/master/src/3d/qgs3dmapscene.cpp#L51

@qgib
Copy link
Contributor Author

qgib commented Nov 22, 2017

Author Name: Martin Dobias (@wonder-sk)


  • subject was changed from QGIS 3D takes upp huge resources even when idle to QGIS 3D uses a lot of CPU even when idle

@qgib
Copy link
Contributor Author

qgib commented Nov 22, 2017

Author Name: Jeremy Palmer (@palmerj)


Thanks for looking at this Martin.

It would be really good to fix this as it's draining my laptop power very quickly!

Did this QT commit not fix the issue qt/qt3d@f865508#diff-01791f33f0106ffe1bdb6d55b78a95e3? That made it into 5.9.0, so maybe you can reactive the code for https://github.com/qgis/QGIS/blob/master/src/3d/qgs3dmapscene.cpp#L51 when the QT version is high enough?

@qgib
Copy link
Contributor Author

qgib commented Nov 23, 2017

Author Name: Martin Dobias (@wonder-sk)


I have tested here with Qt 5.9.0 on linux and unfortunately it did not really help, QGIS still used a lot of CPU (maybe not as bad as before but still), plus there was a new bug when OnDemand was used (switching to a different window and back to QGIS would leave the 3D view black).

@qgib
Copy link
Contributor Author

qgib commented Nov 23, 2017

Author Name: Jeremy Palmer (@palmerj)


Is there a QT ticket to tracking this problem?

@qgib
Copy link
Contributor Author

qgib commented Nov 23, 2017

Author Name: Martin Dobias (@wonder-sk)


I am not sure, we should probably first do more debugging to rule out the possibility it is QGIS 3D problem before we start blaming Qt 3D :-)

@qgib
Copy link
Contributor Author

qgib commented Mar 9, 2019

Author Name: Giovanni Manghi (@gioman)


Please check if this issue is still valid on QGIS 3.4.5 or 3.6.


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Mar 9, 2019

Author Name: Jeremy Palmer (@palmerj)


Still the same under QGIS 3.6

@qgib
Copy link
Contributor Author

qgib commented Mar 9, 2019

Author Name: Giovanni Manghi (@gioman)


  • status_id was changed from Feedback to Open

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! 3D Relates to QGIS' 3D engine or rendering labels May 25, 2019
wonder-sk added a commit to wonder-sk/QGIS that referenced this issue Mar 17, 2021
The on demand policy lowers the load quite significantly (top on my laptop
show the %cpu went from ~300% to ~50% when the 3D scene is idle).

Previously when I tried to enable the on demand policy in Qt 5.9.0, things
were not getting any better, but it seems things got fixed later in Qt 5.9.5:
https://bugreports.qt.io/browse/QTBUG-55109
NEDJIMAbelgacem pushed a commit to NEDJIMAbelgacem/QGIS that referenced this issue Apr 5, 2021
The on demand policy lowers the load quite significantly (top on my laptop
show the %cpu went from ~300% to ~50% when the 3D scene is idle).

Previously when I tried to enable the on demand policy in Qt 5.9.0, things
were not getting any better, but it seems things got fixed later in Qt 5.9.5:
https://bugreports.qt.io/browse/QTBUG-55109
wonder-sk added a commit that referenced this issue Apr 13, 2021
The on demand policy lowers the load quite significantly (top on my laptop
show the %cpu went from ~300% to ~50% when the 3D scene is idle).

Previously when I tried to enable the on demand policy in Qt 5.9.0, things
were not getting any better, but it seems things got fixed later in Qt 5.9.5:
https://bugreports.qt.io/browse/QTBUG-55109
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3D Relates to QGIS' 3D engine or rendering Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant