tickless cron

Rob Landley rob at landley.net
Tue Sep 5 17:25:04 UTC 2006


On Tuesday 05 September 2006 1:20 pm, Rogelio Serrano wrote:
> it is not stupid after all. it can be done as a preprocesss step
> instead. analyse the cron schedule string and generate a list or array
> of timeout events for the particular period which can be easily
> inferred from the schedule string. then all the server needs to to do
> is walk through the structure. more space will be needed though but i
> dont mind.

I'm confused.  If you figure out when the next event is, and wait until that 
next event, why do you care about later events yet?  When does a schedule 
string come into it?  Why does figuring out future events later take more CPU 
power than figuring out future events now?  (You have to wake up later to 
handle one event: why not look for the event after that then?)

What's the advantage of your preprocess step?  It's doing the same amount of 
calculation, it's just doing it earlier than it needs to and allocating 
unnecessary memory to store the result...

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list