Mailing List Archive

Speed of mythepg?
Hi folks,

Just wondering how fast I should expect mythepg to be?

On my Athlon 1.2 it takes about 1 second to scroll left and right. I have
5 channels. I also have an few gaps in my program guide around midnight,
which return back 'unknown' in mythepg. However, scrolling to these items
takes about 5 seconds. As you can imagine this makes it quite difficult to
see what movies are on tomorrow night :-)

I've narrowed down part of the problem. My MySQL server is not localhost.
There is a lot of traffic needed to scroll (from watching my quite
unscientific tcpdump :-), and about 5 times as much traffic when 'unknown'
programs start showing up.

My MySQL server is not that grunty (P233MMX) but, it's not that much
information right?

I appreciate that some sort of lookahead would be a tricky proposal, but
what about a toggle setting that would cause scrolling to be 'page flip'
style - so that when you hit the left or right edge an entire page of new
programs is produced. This at least would mean the performance hit would
be all in one go.

Alternatively, a different set of keystrokes (page up, page down?) could
move entire pages, while left and right arrow preserve their current
behaviour.

- Justin

--
justin@hawkins.id.au | "Don't sweat it --
http://hawkins.id.au | it's only 1's and 0's"
Re: Speed of mythepg? [ In reply to ]
On Sunday 27 October 2002 02:33 am, Justin Hawkins wrote:
> Hi folks,
>
> Just wondering how fast I should expect mythepg to be?
>
> On my Athlon 1.2 it takes about 1 second to scroll left and right. I have
> 5 channels. I also have an few gaps in my program guide around midnight,
> which return back 'unknown' in mythepg. However, scrolling to these items
> takes about 5 seconds. As you can imagine this makes it quite difficult to
> see what movies are on tomorrow night :-)
>
> I've narrowed down part of the problem. My MySQL server is not localhost.
> There is a lot of traffic needed to scroll (from watching my quite
> unscientific tcpdump :-), and about 5 times as much traffic when 'unknown'
> programs start showing up.
>
> My MySQL server is not that grunty (P233MMX) but, it's not that much
> information right?

The major slowdown right now is that it looks up every program for every 5
minute interval right now.. It wasn't as bad a design issue back when it
only dealt with 30 minute intervals, but Andrew's changes to make it more
accurate display-wise are making it do it every 5 minutes, and thus
generating 6 times more lookups. The thing to do would be to only look up
each program once, and skip ahead to the next one without hitting the DB
server for the extraneous data.. It'd be a little bit of work, but if anyone
wants to submit a patch to do it before I get to doing it, that'd be welcome.

> I appreciate that some sort of lookahead would be a tricky proposal, but
> what about a toggle setting that would cause scrolling to be 'page flip'
> style - so that when you hit the left or right edge an entire page of new
> programs is produced. This at least would mean the performance hit would
> be all in one go.
>
> Alternatively, a different set of keystrokes (page up, page down?) could
> move entire pages, while left and right arrow preserve their current
> behaviour.

I was pondering this right before I left on vacation -- took awhile to scroll
through a week's worth of programs to select what I wanted. So yeah, I've
added that to my TODO list.

Isaac
Re: Speed of mythepg? [ In reply to ]
Isaac Richards <ijr@po.cwru.edu> writes:
>
> On Sunday 27 October 2002 02:33 am, Justin Hawkins wrote:
> >
> > Just wondering how fast I should expect mythepg to be?
> >
> > On my Athlon 1.2 it takes about 1 second to scroll left and right. I have
> > 5 channels. I also have an few gaps in my program guide around midnight,
> > which return back 'unknown' in mythepg. However, scrolling to these items
> > takes about 5 seconds. As you can imagine this makes it quite difficult to
> > see what movies are on tomorrow night :-)

Do you have the pretty background image enabled? I tried running
mythepg remotely over 10 Mbps ethernet with the background image and
the network traffic was enormous. It slowed down scrolling to the
sort of speed that you mention.

> > There is a lot of traffic needed to scroll (from watching my quite
> > unscientific tcpdump :-), and about 5 times as much traffic when 'unknown'
> > programs start showing up.
> >
> > My MySQL server is not that grunty (P233MMX) but, it's not that much
> > information right?
>
> The major slowdown right now is that it looks up every program for every 5
> minute interval right now.. It wasn't as bad a design issue back when it
> only dealt with 30 minute intervals, but Andrew's changes to make it more
> accurate display-wise are making it do it every 5 minutes, and thus
> generating 6 times more lookups. The thing to do would be to only look up
> each program once, and skip ahead to the next one without hitting the DB
> server for the extraneous data.. It'd be a little bit of work, but if anyone
> wants to submit a patch to do it before I get to doing it, that'd be welcome.

Looking up a program once would mean a big change to the way that the
code works now. It also won't work with "Unknown" programs for which
there is no database entry. These need to be looked up in each time
slot since they have no duration.

> > Alternatively, a different set of keystrokes (page up, page down?) could
> > move entire pages, while left and right arrow preserve their current
> > behaviour.
>
> I was pondering this right before I left on vacation -- took awhile to scroll
> through a week's worth of programs to select what I wanted. So yeah, I've
> added that to my TODO list.

Since I only have a remote control with a limited number of buttons
can I ask that you consider using one of the number buttons for this
scrolling. They are not used at the moment for the EPG or for video
playback, I am sure that there must be something useful we can do with
them.

--
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop amb@gedanken.demon.co.uk
http://www.gedanken.demon.co.uk/
Re: Speed of mythepg? [ In reply to ]
On Mon, Oct 28, 2002 at 05:14:06PM +0000, Andrew M. Bishop wrote:

> Since I only have a remote control with a limited number of buttons can I
> ask that you consider using one of the number buttons for this scrolling.
> They are not used at the moment for the EPG or for video playback, I am
> sure that there must be something useful we can do with them.

A useful thing to do with the numbers would be to allow you to input a
channel number and jump to that channel. That is what many set top box
EPGs do.

--
- mdz
Re: Speed of mythepg? [ In reply to ]
What about filling in the programs that are there and then just putting
"unknown" everywhere else?

> Looking up a program once would mean a big change to the way that the
> code works now. It also won't work with "Unknown" programs for which
> there is no database entry. These need to be looked up in each time
> slot since they have no duration.

Most devices use the numbers to let you "zoom" to that number.. i.e.,
hitting "501" would take you to 501.. I think that makes way more sense
for the numbers than using them as page up page down.. Any satellite
receiver remote has up, down, left, and right.. in my remote setup, which
I find pretty handy, these cause next-item scrolls, while hitting channel
up or channel down cause next-page scrolls.. Anyway, I think this fish has
been friend many times before by companies making all sorts of digital
receivers..

tarek

> Since I only have a remote control with a limited number of buttons
> can I ask that you consider using one of the number buttons for this
> scrolling. They are not used at the moment for the EPG or for video
> playback, I am sure that there must be something useful we can do with
> them.
>
>
Re: Speed of mythepg? [ In reply to ]
At 28-10-02 18:14, you wrote:
>Isaac Richards <ijr@po.cwru.edu> writes:
> > > There is a lot of traffic needed to scroll (from watching my quite
> > > unscientific tcpdump :-), and about 5 times as much traffic when
> 'unknown'
> > > programs start showing up.
...
> > The major slowdown right now is that it looks up every program for every 5
> > minute interval right now.. It wasn't as bad a design issue back when it
> > only dealt with 30 minute intervals, but Andrew's changes to make it more
> > accurate display-wise are making it do it every 5 minutes, and thus
> > generating 6 times more lookups. The thing to do would be to only look up
> > each program once, and skip ahead to the next one without hitting the DB
> > server for the extraneous data.. It'd be a little bit of work, but if
> anyone
> > wants to submit a patch to do it before I get to doing it, that'd be
> welcome.

Wouldn't it be easier to run a query for each channel for the full timespan
of the visible screen, and parse the result on the clientside? Any slot
without a program present would be "unknown".
This way it would be also be very easy to have the number of timeslots, the
size of the slots, and the "underwater" division in smaller screenslots all
configurable, perhaps even in settings.txt.

Not clear to me anyway why you need the "unknown" on the screen, I am going
to feed the database with a filtered set from xmltv because I don't want
the screen cluttered with a zillion programs I will never watch. And I
certainly don't want to see the text "unknown" as replacement clutter :-)

Erik
Re: Speed of mythepg? [ In reply to ]
>...It'd be a little bit of work, but if anyone wants to submit a patch to
do it
> before I get to doing it, that'd be welcome.

OK, I started modifying. Changes should be finished this weekend or just after.

Original uses 180 queries for a normal initial EPG screen, and if no
program is present (I only download 18:00 to 04:00 programming due to a
very slow connection) it generates 1080 (!!!) SQL-requests for the initial
page.

My version only uses 6 request for a screen, whatever the number of
programs (no program gives same performance).

I am looking into some internal duplication issues next to improve
performance even more, not sure though if it is worth the effort on a fast
machine as used for a PVR, need some more testing.

Erik
Re: Speed of mythepg? [ In reply to ]
On Fri, 1 Nov 2002, Erik Arendse wrote:

> Original uses 180 queries for a normal initial EPG screen, and if no
> program is present (I only download 18:00 to 04:00 programming due to a
> very slow connection) it generates 1080 (!!!) SQL-requests for the initial
> page.
>
> My version only uses 6 request for a screen, whatever the number of
> programs (no program gives same performance).

That - is *really* cool :-)

- Justin

--
justin@hawkins.id.au | "Don't sweat it --
http://hawkins.id.au | it's only 1's and 0's"