[mythtv] SELECT where RecordChanged... once a second

Joseph A. Caputo jcaputo1 at comcast.net
Fri Aug 29 17:14:47 EDT 2003


> -----Original Message-----
> From: mythtv-dev-bounces at mythtv.org
> [mailto:mythtv-dev-bounces at mythtv.org]On Behalf Of Kirby Vandivort
> Sent: Friday, August 29, 2003 3:46 PM
> To: Development of mythtv
> Subject: Re: [mythtv] SELECT where RecordChanged... once a second
>
>
> > Well, if you schedule a recording for a program that's already
> started, you
> > don't want to wait a minute before the backend picks it up.
>
> True....  Hmmm...
>
> Realistically, I'd hypothesize that, on average, 'record' actually
> changes slightly more than once per day (assuming you have your cron
> set up to grab new data once a day).  Definitely the primary time
> it would change is when you get new data, and the only other times
> would be when a user actually modified their record list..  Which,
> in reality really doesn't happen all that often.. (more when you
> are first starting with myth, of course  :)
>
> So, we have an event that is occuring, let's say twice or three times
> a day on average, and we are checking for it 86,400 times.


Actually, I make changes to my record table all the time... I frequently do
a 'let's see what's on tonight' and find a few interesting things.
Scheduling things a week in advance isn't always feasible, except for
programs you're expecting (i.e., recurring series or heavily advertised
special events).  For other things, it's often easier to scan the EPG for
the upcoming day and schedule a bunch of stuff.  But that's just me.


> Again, I'm just thinking out loud here..  What if we had 6543 listening
> for a command to recheck 'record'?  Then, when something actually changed
> the record table it would ping 6543 with a note saying that it had done
> it.. (a poor man's callback, if you will)

On the surface, I like that approach.  I was never a big fan of polling in
general, though polling does eliminate the possibility of a missed
signal/message/callback.  Probably a combination of the two would work
best... a network notification from the frontend/mythweb/whatever, plus the
existing polling, dialed down to a longer interval.

Of course, I'm not having problems with this, so it really doesn't matter to
me.  For that matter, do you have logrotate set up properly?  It seems to me
the 8 megs of logs per day isn't alot, unless either your /var/log partition
is really living on the edge of full, or your logs aren't being rotated
regularly.

-JAC



More information about the mythtv-dev mailing list