Project

General

Profile

Bug #1521

Quassel requests 1ms timer precision on Windows client

Added by warpsharp over 2 years ago. Updated 21 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
03/17/2019
Due date:
% Done:

0%

Estimated time:
Version:
0.13.0
OS:
Windows

Description

Quassel is requesting 1ms timer precision on the Windows client which has the potential to hurt battery life on mobile devices. Is there any particular reason that quassel is requesting such high precision? Or is it just a QT thing that's getting bundled?

This should be a relatively straightforward fix if it doesn't need that precision. Just not sure where it's coming from yet but I can try and look into it.

History

#1 Updated by ben-zen 21 days ago

From some code investigation, Quassel's using a bunch of QTimers, and I went and dug into how Qt itself handles timers; the really juicy details are in https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/kernel/qeventdispatcher_win.cpp -- searching for SetTimer finds the way these timers are created.

Basically, Qt is using the non-coalesceable timers for everything; this seems like a spot where it'd be advantageous to make possibly both CoarseTimer and VeryCoarseTimer timers not just round their intervals, but also switch to coalescing overall. It looked like basically all the timers in Quassel are coarse, so this would immediately benefit this codebase. But this is an attempt to patch something in the framework, so who knows when it'd happen.

Within Quassel, it's also worth seeing if all these timers are actually needed. I haven't done a full survey yet to see if there's really no other way to achieve some goals.

Also available in: Atom PDF