Problems with 20 Timers

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

 



Chris Warren wrote:

> 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()...)

I've not looked at the code but am I right in thinking it scans trhough 
the list to find the next event?

surely in that case you only need to scan the list once, and remember 
the time of the next event, only rescanning when the next event is reached?


[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