Bug 500500

Summary: kwin does not use PreciseTimers in renderloop
Product: [Plasma] kwin Reporter: Apostolos Dimitromanolakis <dimitromanolakis>
Component: coreAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nate, vasua.ukraine, xaver.hugl
Priority: NOR Keywords: efficiency-and-performance
Version: master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 6.4.0
Sentry Crash Report:
Attachments: patch to switch timer types

Description Apostolos Dimitromanolakis 2025-02-21 02:05:45 UTC
Created attachment 178667 [details]
patch to switch timer types

When the renderloop timer is contrsucted no default timer type is set, so the default CoarseTimer is used. CoarseTimer can have a +/- 20% timing offset, which is definetely not ideal for a renderloop.

Suggest using PreciseTimers for this and other timer critical timers in KWin.
Comment 1 Nate Graham 2025-02-22 04:09:06 UTC
Implemented with https://invent.kde.org/plasma/kwin/-/merge_requests/7211!
Comment 2 Yoshio Sato 2025-02-22 13:09:51 UTC
Does it mean more smoothness? (In reply to Nate Graham from comment #1)
> Implemented with https://invent.kde.org/plasma/kwin/-/merge_requests/7211!
Comment 3 Apostolos Dimitromanolakis 2025-02-24 03:37:01 UTC
It will be a little bit smoother. Previously some animations were not drawn with the correct timing, mostly when windows open/close/maximize or you move windows around the screen.  And there should be a little bit less latency in some situations. The difference is not big but is noticable.