Add notes on performance for Qt bitmap present#139
Merged
almarklein merged 3 commits intomainfrom Nov 13, 2025
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intro
In benchmarks that I did for #138, I observed that the Qt backend is quite a bit slower than the experimental Cocoa/Metal backend. So I looked into whether its performance can be improved. I suspected that the
painter.drawImageused software rendering.Result
I tried a few things, but did not find a way to make it more performant. Using QOpenGLWidget does lead to reduced CPU usage, possibly at the cost of GPU usage.
My take on this:
painter.drawImage()inQWidgetindeed uses software rendering.painter.drawImage()inQOpenGLWidgetdoes some rendering on the GPU.All in all, I propose we leave the implementation as-is.
More notes
_rc_present_bitmap()a no-op, it's slower than the experimental Cocoa backend with the same method a no-op. This suggests that some of the overhead is due the Qt event loop.