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

Joseph A. Caputo jcaputo1 at comcast.net
Fri Aug 29 16:24:51 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:07 PM
> To: mythtv-dev at mythtv.org
> Subject: [mythtv] SELECT where RecordChanged... once a second
> Ran out of space on one of my partitions last night and was digging
> around looking for why, and tracked it down to the mysql.log log file.
> Come to find out,
> SELECT data FROM settings WHERE value = "RecordChanged"
> is getting called once a second, every second..
> So, this was chewing up 92 bytes/line of the log file, 3600 times a
> hour, 24 hours a day..  (close to 8 megs of logs a day)
> I've since reworked the mysql logging parameters a bit to remove my
> problem with it..
> This was indirectly mentioned back in April..
> http://www.gossamer-threads.com/perl/mailarc/gforum.cgi?post=56963
> Since we can assume that the finest granularity of programming is
> on the minute, is it really necessary to check every second?
> >From looking in scheduler.cpp, it looks like a sleep(1) is being
> done at the end of the while(1) and the db call is (eventually)
> getting done inside of that while.  There are a number of things
> going on inside the loop; some of which need a granularity of 1
> second..  I wonder if the SELECT could be pulled out of that..
> I'm just thinking out loud.  I might look into doing something about
> the frequency of that at some point if I get a chance if people see it
> as a useful thing.

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.


More information about the mythtv-dev mailing list