too much time before init of Radio GUI

Discussion in 'General Support' started by verolano, November 8, 2008.

  1. verolano

    verolano Portal Member

    Joined:
    September 25, 2006
    Messages:
    20
    Likes Received:
    0
    Location:
    Rome
    Ratings:
    +0 / 0
    Home Country:
    Italy Italy
    Ciao a tutti,
    on my system entering on Radio section takes about 30 seconds.
    Is there anybody with the same problem?

    in Mediaportal.log
    ...
    2008-11-08 14.04.10.078125 [Debug][MPMain]: Window: TvPlugin.Radio init
    2008-11-08 14.04.40.640625 [Info.][MPMain]: OnClick
    2008-11-08 14.04.48.765625 [Debug][MPMain]: Windowmanager: Goto previous window
    2008-11-08 14.04.49.046875 [Debug][MPMain]: Window: TvPlugin.Radio deinit
    ...

    Db is MySql, maybe a query problem?



    Grazie
    PG
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. BugsBunny

    BugsBunny Portal Pro

    Joined:
    April 22, 2006
    Messages:
    210
    Likes Received:
    12
    Location:
    Tirol
    Ratings:
    +13 / 0
    Home Country:
    Austria Austria
    I've the same problem using Microsoft SQL Server. It seems if there are a lot of Radio Stations (in my case about 40 Pages ~ 500 radio channels) it takes that long. Maybe a workaround would be to create folders with less radio stations in it and to use them instead of "All Channels"
     
  4. Chris84

    Chris84 Portal Pro

    Joined:
    December 4, 2005
    Messages:
    116
    Likes Received:
    0
    Ratings:
    +0 / 0
  5. theboy

    theboy New Member

    Joined:
    December 24, 2008
    Messages:
    1
    Likes Received:
    0
    Ratings:
    +0 / 0
    Home Country:
    Hi all,

    I was also suffering from this issue so I decided to (let's say) fix it, below is what I found on the topic.

    It's not database and it's not your individual settings it's just application logic.
    Before radio screen is entered and every time is entered, all radio station items are pulled
    from the server and sorted according to the chosen or default sort criteria.

    The problematic thing is that every single radio item is casted to the object not once but multiple
    times, once per every layout style used in application (you can find layout styles in left menu bar)
    in case of radio subsystem there are six casts, even if radio uses only three of them (list, icons and
    big icons - additional not used but prepared are; album, thumbnail, and play list). So if you have 100
    programs tuned there will be six list created with 100 objects in every one of them. The real problem
    starts when program begins to sort these objects, as every mentioned list, is in memory sorted with help
    of not efficient algorithm, so there is 6 sorts which not scale at all and results are poorer and poorer
    when number of programs rise. Hence it takes a while to finish that task before radio page is returned
    to the application.

    I have about 30 stations and it took about 15 seconds to get the radio page opened. Below is my temporary
    solution, it gives much quicker response and if you don't need sorting you might find it useful otherwise ask
    development team for the proper fix.

    What was changed:
    TvEngine3\TVLibrary\TvPlugin\TvPlugin\Radio.cs

    #region Sort Members
    void OnSort()
    {
    SetLabels();
    //facadeView.Sort(this); <---- this was commented out
    UpdateButtonStates();
    }

    If you would like to use compiled dll, it is attached to the post, note this is debug release and came from the version 1 RC3, might work for other versions as well.

    TvPlugin.dll Should be copied to following path "...Team MediaPortal\MediaPortal\plugins\Windows\", don't forget
    to backup your older version of the library first.

    Cheers,
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!