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
    i've already tried the search but wasn't able to found the thread. As you've already read i also have a ded. 4350 at it's the same.
     

    framug

    Super Moderator
  • Team MediaPortal
  • January 31, 2005
    5,960
    2,045
    South of France
    Home Country
    France France
    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.
     

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    Any combination of following:

    • 0x0 none
    • 0x1 notify
    • 0x2 record
    • 0x4 record series

    I'll change the "isRecording" bit attribute in table "program" to an int "state" attribute.

    It should hold those 4 states (as Mr. tourettes described):
    * 0x0 none
    * 0x1 notify
    * 0x2 record
    * 0x4 record series

    this way the tvguide code doesnt have to look up the associcated schedule record to see if it is a series or not.
    We can delete the existing "notify" attribute from the table, since the "state" attribute will take care of this.

    again much of the tvguide code would get more simplistic - and we like that :)

    /gibman
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    again much of the tvguide code would get more simplistic - and we like that :)

    But EPG grabbing code will get more complex (and same goes with the schedule creation, althou they can both use the same class... and should :)). So, it would be most likely a good thing to leave such optimization out of 1.1.0, as it is really easy to introduce new bugs.
     

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    maybe we need another enum value for "conflict"...making it look like:

    public enum ProgramState
    {
    None = 0,
    Notify = 1,
    Record = 2,
    RecordSeries = 3,
    Conflict = 4
    }

    looking for a conflict in tvguide looks like this:

    foreach (Schedule record in _recordingList)
    {
    if (record.IsRecordingProgram(_currentProgram, true))
    {
    if (record.ReferringConflicts().Count != 0)
    {
    bConflict = true;
    }
    ....

    /gibman
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    public enum ProgramState
    {
    None = 0,
    Notify = 1,
    Record = 2,
    RecordSeries = 3,
    Conflict = 4
    }


    Correct one would be to use:

    public enum ProgramState
    {
    None = 0,
    Notify = 1,
    Record = 2,
    RecordSeries = 4,
    Conflict = 8
    }

    You need to use that enum as flags since you are able to have multiple states at once. For example there could be a notify for a program that is having a recording dot shown (or conflict).
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    even "more correct" would be to define them as flags, if you want to use bitwise combinations:
    Code:
        [B][Flags][/B]
        public enum ProgramState
        {
          None = 0,
          Notify = 1,
          Record = 2,
          RecordSeries = 4,
          Conflict = 8
        }

    When you deal with the bitflags, you might look into the BitHelper class (I used it in TvHome channel change function), it helps with set, reset and interprete flags ...

    public enum ProgramState
    {
    None = 0,
    Notify = 1,
    Record = 2,
    RecordSeries = 3,
    Conflict = 4
    }


    Correct one would be to use:

    public enum ProgramState
    {
    None = 0,
    Notify = 1,
    Record = 2,
    RecordSeries = 4,
    Conflict = 8
    }

    You need to use that enum as flags since you are able to have multiple states at once. For example there could be a notify for a program that is having a recording dot shown (or conflict).
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    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.
    thanks will try that and post results
     

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    yeah I already did the [flags] for enums - but thx for the advice.

    its current "state", hehe, is:

    [Flags]
    public enum ProgramState
    {
    None = 0,
    Notify = 1,
    RecordOnce = 2,
    RecordSeries = 4,
    RecordManual = 8,
    Conflict = 16
    }

    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 ?


    public static IList<Program> RetrieveAllNotifications()
    {
    SqlBuilder sb = new SqlBuilder(StatementType.Select, typeof(Program));
    sb.AddConstraint(Operator.GreaterThanOrEquals, "state", ProgramState.Notify);

    SqlStatement stmt = sb.GetStatement(true);
    return ObjectFactory.GetCollection<Program>(stmt.Execute());
    }

    Other than that things are progressing nicely :)

    /gibman
     

    Users who are viewing this thread

    Top Bottom