Commit Message
I demand that Chris Warren may or may not have written...
[snip]
> It seems that the more timers you have the slower VDR (1.3.21) becomes. I
> normally get "max. latency time 2 seconds" in my syslog, however when I
> have 20 timers, I get "max. latency time 17 seconds". What's causing it to
> slow down so much?
[snip]
The attached patch (which is in my vdr package) should help.
@@ -545,6 +545,7 @@
if (Schedules) {
if (!lastSetEvents || Schedules->Modified() >= lastSetEvents) {
for (cTimer *ti = First(); ti; ti = Next(ti)) {
+ if (ti->StartTime() - time(NULL) > 60*60*24*2) continue; // #reduce cpu load
const cSchedule *Schedule = Schedules->GetSchedule(ti->Channel()->GetChannelID());
if (Schedule) {
if (!lastSetEvents || Schedule->Modified() >= lastSetEvents) {