Graphics performance drops when running with multiple (duplicate) windows
-
The Qt UI application I'm developing shows a performance drop when adding multiple (duplicate) windows.
The application consists of multiple pages and the goal is to show multiple pages at the same time. Either in multiple windows on one screen or on multiple screens with a single window per screen. In order to duplicate a window I use the following code:
ToolButton { id: duplicateScreen text: MaterialDesign.icons.filter_none anchors.right: parent.right anchors.verticalCenter: toolButton.verticalCenter onClicked: { var component = Qt.createComponent("qrc:/Frontend/main.qml"); var win = component.createObject(mainwindow); win.show(); } }
However, when duplicating the window (by using the example code) the performance of the application starts to drop and the application becomes less responsive. When using a single window, the application is running smoothly at 60 FPS, but this drops to ~40 FPS when duplicating the window once. Adding a third clone drops the FPS even further (~25 FPS). Performance keeps on decreasing when adding more and more windows.
A performance drop would be expected when the application is utilizing all CPU power, however, only 160% out of 400% is being used.
Could somebody help me out and point me towards a possible cause or solution?