TV Guide very slow vertical scrolling since RC3 (1 Viewer)

disaster123

MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    Hi disaster123,

    May be the best way for testing it, is to remove your schedules and, see if it is faster than before ?
    Otherwise, if you can't/don't want to, I suppose putting comments on :

    LoadSchedules(true);

    in lines 697 and 923 of TvGuideBase.cs could be enough for testing if this cause the problem.

    Of course, you will loose all _recordingList related, after that.
    Hope it helps.

    Bye.

    I've now removed these lines of code but Guide is still slow in vertical scroll when next channel comes up. It is OK in horizontal scoll and also in vertical scroll when NO new channel comes up.

    I've now tried to track down my problem and it happens in this method:
    Code:
            // if cursor is on a program in guide, try to find the "best time matching" program in new channel
            SetBestMatchingProgram(updateScreen, true);

    This one takes up to 1s here.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    I've now tried to track down my problem and it happens in this method:
    Code:
            // if cursor is on a program in guide, try to find the "best time matching" program in new channel
            SetBestMatchingProgram(updateScreen, true);

    This one takes up to 1s here.


    Code:
    // TODO rewrite the while loop, the code is a little awkward.


    :p
     

    robby3

    Portal Pro
    April 9, 2008
    131
    2
    Home Country
    Switzerland Switzerland
    I don't know if it helps, but if a streaming to this clinet is running the EPG scrolling for the next channel is additionally slower. I've tried this on the server standalone and it's the same problem, just a little faster due to the fact that client/server are on the same machine. Just a few logs, maybe they help for deeper investigations.

    Thanks to the developers
    Robby
     

    framug

    Super Moderator
  • Team MediaPortal
  • January 31, 2005
    6,244
    2,312
    South of France
    Home Country
    France France
    I've now tried to track down my problem and it happens in this method:
    Code:
            // if cursor is on a program in guide, try to find the "best time matching" program in new channel
            SetBestMatchingProgram(updateScreen, true);
    This one takes up to 1s here.
    OK and, inside SetBestMatchingProgram method, did you find where is it waiting for 1 sec ?
    Maybe in
    Update(false);
    called method or, elsewhere ?
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    ...
    Code:
    // TODO rewrite the while loop, the code is a little awkward.
    :p

    Seen that but this loop is not the problem.

    I've now tried to track down my problem and it happens in this method:
    Code:
            // if cursor is on a program in guide, try to find the "best time matching" program in new channel
            SetBestMatchingProgram(updateScreen, true);
    This one takes up to 1s here.
    OK and, inside SetBestMatchingProgram method, did you find where is it waiting for 1 sec ?
    Maybe in
    Update(false);
    called method or, elsewhere ?

    Didn't had the time yesterday but tested it now and you're right it is THIS update which takes so long.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    How do I got about doing a SQL select statement with a proper WHERE clause for ex. "notify"

    In other words.. give me all program entries which have the notify flags set ?

    I think you have to use a manual where condition, I don't know if gentle offers bitwise operations :confused:

    For SQL where clause, both MS-Sql and MySQL do support the & operator:
    Code:
    where state & 1 = 1

    the 1 is your notify bit. this should work for any bit combinations
     

    framug

    Super Moderator
  • Team MediaPortal
  • January 31, 2005
    6,244
    2,312
    South of France
    Home Country
    France France
    tested it now and it is THIS update which takes so long.
    Then, you know what you have to do, finally.
    Tracking wich operation take time in Update(bool selectCurrentShow) method.
    Good luck and, if you find where, please post, it's always interesting to know such things. ;)
    Regards.
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    i can do this - the only question is if perhaps in this update method the red dot "calculation" / queries is done. If it is done... then it might be the same problem. But i'll have a look.
     

    framug

    Super Moderator
  • Team MediaPortal
  • January 31, 2005
    6,244
    2,312
    South of France
    Home Country
    France France
    the only question is if perhaps in this update method the red dot "calculation" / queries is done.
    Well, Update() method doesn't handle red dot.
    The red dot related stuff is in _recordingList related loops, by posit the bRecording boolean.

    Code:
              foreach (Schedule record in _recordingList)
              {
                if (record.IsRecordingProgram(_currentProgram, true))
                {
                  ............
                  bRecording = true;
                  break;
                }
              }
            ....
            if (bRecording)
            {
              GUIImage img = (GUIImage)GetControl((int)Controls.IMG_REC_PIN);
              .......
              GUIControl.ShowControl(GetID, (int)Controls.IMG_REC_PIN);
            }
    You already tryied with removing this part of code without gain then, your problem seems to be not "red dot" related.
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    I've tried to track down my issue. The most thing i'm wondering is, that nearly everything is done TWICE.

    This is my log (with modified tvplugin) for one scroll down (at the end of the list)

    Code:
    2009-10-22 20:57:24.211910 [Debug][MPMain]: START GetChannels(false)
    2009-10-22 20:57:24.212910 [Debug][MPMain]: END GetChannels(false)
    2009-10-22 20:57:24.212910 [Debug][MPMain]: START LoadSchedules(false)
    2009-10-22 20:57:24.212910 [Debug][MPMain]: END LoadSchedules(false)
    2009-10-22 20:57:24.212910 [Debug][MPMain]: START layer.GetProgramsForAllChannels
    2009-10-22 20:57:24.311916 [Debug][MPMain]: END layer.GetProgramsForAllChannels
    2009-10-22 20:57:24.311916 [Debug][MPMain]: START FOR
    2009-10-22 20:57:24.553930 [Debug][MPMain]: END FOR
    2009-10-22 20:57:24.553930 [Debug][MPMain]: if (updateScreen)
    2009-10-22 20:57:24.553930 [Debug][MPMain]: END if (updateScreen)
    2009-10-22 20:57:24.553930 [Debug][MPMain]: START Correct
    2009-10-22 20:57:24.554930 [Debug][MPMain]: START Update
    2009-10-22 20:57:24.554930 [Debug][MPMain]: START GetChannels(false)
    2009-10-22 20:57:24.554930 [Debug][MPMain]: END GetChannels(false)
    2009-10-22 20:57:24.554930 [Debug][MPMain]: START LoadSchedules(false)
    2009-10-22 20:57:24.554930 [Debug][MPMain]: END LoadSchedules(false)
    2009-10-22 20:57:24.556930 [Debug][MPMain]: START layer.GetProgramsForAllChannels
    2009-10-22 20:57:24.632934 [Debug][MPMain]: END layer.GetProgramsForAllChannels
    2009-10-22 20:57:24.633934 [Debug][MPMain]: START FOR
    2009-10-22 20:57:24.900949 [Debug][MPMain]: END FOR
    2009-10-22 20:57:24.901949 [Debug][MPMain]: Start setfocus
    2009-10-22 20:57:24.936952 [Debug][MPMain]: END setfocus

    So what is slowing down here is doing everything two times AND the for loop is slow
    Code:
              Log.Debug("START FOR");
         for (int iChannel = 0; iChannel < _channelCount; iChannel++)
              {
                if (chan < _channelList.Count)
                {
                  Channel channel = (Channel)_channelList[chan];
                  RenderChannel(ref programs, iChannel, channel, iStart, iEnd, selectCurrentShow);
                  // remember bottom y position from last visible button
                  GUIButton3PartControl imgBut = GetControl((int)Controls.IMG_CHAN1 + iChannel) as GUIButton3PartControl;
                  if (imgBut != null)
                  {
                    if (iChannel == 0)
                      firstButtonYPos = imgBut.YPosition;
    
                    lastButtonYPos = imgBut.YPosition + imgBut.Height;
                  }
                }
                chan++;
                if (chan > _channelList.Count)
                {
                  GUIButton3PartControl imgBut = GetControl((int)Controls.IMG_CHAN1 + iChannel) as GUIButton3PartControl;
                  if (imgBut != null)
                    imgBut.IsVisible = false;
                  //chan = 0;
                }
              }
    
              Log.Debug("END FOR");
     

    Users who are viewing this thread

    Top Bottom