more responsive event system#927
Conversation
|
Some questions/suggestions: (why is it called TASK_PROCESSOR_HZ ?, maybe just call it 'schedule_resolution' or timer_resolution)
|
|
|
25 times a second ? dont you think that is a bit to much ? |
|
That's why I've turned it into a #define, to test various frequencies :). Turns out that for my situation I need at least 10 times a second (10Hz, 100ms interval), but like I said, it makes no difference performance wise to push it a bit more. I've had it running for days at 50Hz (20ms interval) without any problems whatsoever, but that was overkill for sure. |
|
maybe timer_resolution_hz will be read from setup->settings ? |
|
I've thought of that too, but I came to the conclusion that it wouldn't hurt 'ordinary' users in terms of performance (or anything else for that matter) if the event system runs more frequently. They wouldn't even notice it. And for those in need of it, it is just there :) so why bother making this a setting, imho. |
|
Nice work! For me the 10 times/sec was quite good. |
|
Sorry, i forgot to merge this ;)... Thanks for the patch |
This change will make the event system more responsive as discussed in this thread on the developer forums. I know that for many an interval of 1 second is more than enough, but my situation requires a much shorter interval. Both are now possible. Existing systems won't require any change to keep on working like they did, and for others it's now possible to trigger events much quicker.
http://www.domoticz.com/forum/viewtopic.php?f=9&t=13509
A few notes: