Qt4 interface abusive timer
The Qt4 interface fires a timer every 150ms or so - even when nothing is happening at all (no playback). This is wrong, and harmful to battery lifetime.
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Rémi Denis-Courmont added Component::Interface: Qt Severity::normal Type::feature + 1 deleted label
added Component::Interface: Qt Severity::normal Type::feature + 1 deleted label
- Rémi Denis-Courmont changed milestone to %0.9.0 features freeze
changed milestone to %0.9.0 features freeze
- Owner
Yes, it should be removed, and use event driven callbacks. However, this is still complex to do for some part, especially for all updates on the input manager. I don't know how to fix it now. I may be able to slow it down, without this being too harmful. What would a better value be ? Maybe zorglub has an idea... Doing this for 0.9.0 might be unrealistic...
- Jean-Baptiste Kempf added Difficulty::hard label
added Difficulty::hard label
- Owner
We use this timer for:
-
Messages displaying... Can I have callback when messages arrive ?
-
Meta Data and statistics... I can slow it down, but I will need it whatever happens.
-
Input: name change, slider update and time change: I can slow it down, but not > .5s
-
Main Interface: application should die. This should be event-driven, but I don't know how to do it.
-
- Messages: this might be the trickiest as we have no callback system for messages
- Meta / Input: this should be displayed when no input is playing. For this, we have events.
- should die: as far as I remember, the object variable is signalled when the b_die flag is set, so you could probably sleep on it.
- Owner
I'll do part of this soon. But most of it may have to wait.
- Jean-Baptiste Kempf changed milestone to %0.9.2
changed milestone to %0.9.2
- Developer
I got basic event/callback based inputmanager working for myself, it need still cleanup before commit.
- Ilkka Ollakka assigned to @ileoo and unassigned @jbk
- Developer
only polling timer left is in MainInterface which checks intf_ShouldDie( p_intf ), is there any variable callback for that or is it needed at all ?
- Ilkka Ollakka changed milestone to %0.9.0-test1
changed milestone to %0.9.0-test1
- Owner
We can't do anything about the statistics and the messages, but if the intf_ShouldDie is removed the Timers would only be launched with those dialogs.
- Owner
So, as it seems we don't have any other choice to monitor regularly intf_ShouldDie, we have to keep this timer.
Having a timer in messages and in statistics only, when they are opened will be a trivial change afterwards.
- Jean-Baptiste Kempf changed milestone to %0.9.2
changed milestone to %0.9.2
- Developer
commit 8689e8be changed that stats timer to event-based.
For messages adding event could easily create infinite loop, so same approach doesn't fit in that directly.
- Developer
msg_ system has changed to callback-based, so that drops out another timer from qt4-interface.
So only timer left should be that intf_ShouldDie atm.
- Ilkka Ollakka added Status::fixed label
added Status::fixed label
- Ilkka Ollakka closed
closed