Skip to content

Draft: contrib: qtbase: add patch to improve responsiveness on windows

On Windows, Qt does not treat queued connections fairly. This is a problem for us, because most of the operations we are doing are asynchronous, for optimization or utility reasons.

For example, the texture sub-rect geometry is a delayed binding as we don't want to apply effect for texture if the result is just going to be dismissed (due to geometry change, effect needs to be applied again).

We also use delayed bindings in complex layouting, such as within the player control bar where controls need to be invisible when they no longer fit into the space (unless expandable).

In summary, this seems to how Qt behave with regard to queued connections:

  • In the worst case (messages are constantly pushed), they may be delayed forever if Windows keep sending messages. This is the case with window resize, for example.

  • In the average case (there were messages when event dispatcher encountered with a queued call), they are delayed by 10~ milliseconds.

  • In the best case, there is no delay, but this is rare for a GUI application, as GUI applications almost always have messages due to user interaction.

Draft because:

  • This patch can be improved, as there is currently one elapsed timer for all queued connections (custom messages). If there are queued connections constantly being pushed, then this patch would then work in favor of queued connections (and treat others not so fairly). This is no longer the case with the updated patch, as it only sends fixed amount of posted events (32) and not all of them.
  • I want others to test it. I want to make sure there is no regression.

Close #29038.

Request review @chub.

Edited by Fatih Uzunoğlu

Merge request reports

Loading