<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE></TITLE>

<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=126043118-15072004><FONT face=Arial 
color=#0000ff size=2>The problem is you don't want it cached and at the same 
time update every second - what would be the point? You would only be as up to 
date as your cache which could be several seconds off. Maybe a better way would 
be to on every channel change pull in 2 (or more) hours of information and only 
check again after 2 hours for updates. Then you could update at the times when 
the schedule changes.</FONT></SPAN></DIV>
<DIV><SPAN class=126043118-15072004><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=126043118-15072004><FONT face=Arial color=#0000ff size=2>- 
Mark.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><BR></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Tako Schotanus 
[mailto:quintesse@palacio-cristal.com] <BR><B>Sent:</B> Thursday, July 15, 2004 
2:10 PM<BR><B>To:</B> Development of mythtv<BR><B>Subject:</B> Re: [mythtv] 
Watching Live TV &amp; method TV::GetChannelInfo getting called every 
second<BR></FONT><BR></DIV>
<DIV></DIV>Isaac Richards wrote: 
<BLOCKQUOTE cite=mid200407151309.47103.ijr@po.cwru.edu type="cite"><PRE wrap="">On Thursday 15 July 2004 12:43 pm, Buechler, Mark R wrote:
  </PRE>
  <BLOCKQUOTE type="cite"><PRE wrap="">Admittedly, I'm working with a two day old copy of CVS but I've seen this
for a few weeks now. I see on my backend mysqld running at 45-55% CPU and
the frontend taking more CPU than it should as well. I tracked it down to a
SQL statement running every second getting channel information while
watching live TV.

I was wondering if anyone might know why
    </PRE></BLOCKQUOTE><PRE wrap=""><!---->
LCD info updater.  I didn't realize it was going every second, I'll bump it up 
a lot, or actually, now that I look at this, I don't think it's thread safe 
at all..

  </PRE></BLOCKQUOTE>Sorry, had no idea that GetChannelInfo would hit the 
database so much.<BR>It did this every second so you could see program info 
changes while watching live tv.<BR><BR>So now I've got two questions because I 
really want this to work (and I'm not the only one for sure).<BR><BR>1. Is there 
a way to get this channel information without hitting the database so much? (Is 
there a function that does local caching of the results for eample?)<BR><BR>2. 
Why isn't it thread-safe? I tried to model the LCD code as much as possible on 
the OSD code thinking that if it was okay to update the OSD it would probably be 
okay to update the LCD as well. But if you can tell me where/how it can go wrong 
I'll fix it (or at least try 
to).<BR><BR>Cheers,<BR>&nbsp;-Tako<BR><BR><br><br><br><br><br>Bausch & Lomb<br>150 Years of Perfecting Vision, Enhancing Life (TM)<br><br><br><br><br><br><br>EMAIL DISCLAIMER <br><br>Please Note: The information contained in this message may be privileged and<br>confidential, protected from disclosure, and/or intended only for the use of<br>the individual or entity named above. If the reader of this message is not<br>the intended recipient, or an employee or agent responsible for delivering<br>this message to the intended recipient, you are hereby notified that any<br>disclosure, distribution, copying or other dissemination of this<br>communication is strictly prohibited. If you received this communication in<br>error, please immediately reply to the sender, delete the message and<br>destroy all copies of it.<br><br>Thank You<br></BODY></HTML>