Problems with 20 Timers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
| Darren Salt | nr. Ashington, | d youmustbejoking,demon,co,uk
| Debian,     | Northumberland | s zap,tartarus,org
| RISC OS     | Toon Army      | @
|   Retrocomputing: a PC card in a Risc PC

Ever shoot an elephant in your pyjamas?
-------------- next part --------------
#! /bin/sh /usr/share/dpatch/dpatch-run
## 13_ignore_distant_timers.dpatch by Thomas Dingermann <thomas@xxxxxxxxxxxxxxxx>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Ignore timers due to start >= 2 days from now

@DPATCH@
diff -urNad vdr-1.3.18/timers.c /tmp/dpep.d4jqSK/vdr-1.3.18/timers.c
--- vdr-1.3.18/timers.c	2005-01-09 17:03:30.000000000 +0000
+++ /tmp/dpep.d4jqSK/vdr-1.3.18/timers.c	2005-01-09 17:03:32.000000000 +0000
@@ -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) {

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux