too much time before init of Radio GUI (1 Viewer)

verolano

Portal Member
September 25, 2006
20
0
Rome
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
 

BugsBunny

Portal Pro
April 22, 2006
214
25
Tirol
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"
 

Chris84

Portal Pro
December 4, 2005
116
0

theboy

New Member
December 24, 2008
1
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,
 

Users who are viewing this thread

Top Bottom