[vdr] Problems with 20 Timers

C.Y.M syphir at syphir.sytes.net
Fri Feb 25 17:59:17 CET 2005

Chris Warren wrote:
>>You could do some profiling with gprof.
>>To that you need to link vdr with -- hmm -- I think gp (read: 
>>add -lgp when linking), then run it inside gprof (gprof vdr ....).
> 84.78%     51.92    51.92    70436     0.00     0.00 
> cSchedule::GetEvent(unsigned short, long) const
> That's the culprit...
> I wonder if it would be worth rewriting cSchedule to store events in a
> binary tree based on time. A double-linked list could be included in the
> nodes pointing to allow for scanning through the schedule in the
> conventional way (for(cEvent *p = events.First()...)
> This would cut down the amount of work required to find an event based on
> time (used for timers, finding now/next events and probably numerous other
> places). Another tree of pointers could be built based on event id, to speed
> up searching based on IDs too.
> What do people think, would it be worth me writing a patch?

Have you noticed that the show summaries (Recordings descriptions) are wrong on 
recorded events when you use a timer?  I am curious if this behavior has to do 
with what you are describing.  The only way I can get the summaries to display 
the correct information is if I record a minute longer after the show ends. For 
example, lets say a show starts at 1:00 and ends at 2:00. If you set a timer for 
1:00 to 2:00, then in the schedule will show a little "t" next to the show you 
have set to record.  But, if you set a timer for 1:00 to 2:01, then the schedule 
shows a capital "T" next to the show being recorded and two little "t"'s before 
and after the scheduled show.  The first method will use the Summary of the 
previously scheduled show and the second method seems to use the correct 

Best Regards,

More information about the vdr mailing list