Whops. Wrong improvement forum. This ought to be in the mediaportal1 improvement forum. any mod that wants to move it?
Started on: 2007-04-16
last update: 2007-04-16
Summary:
- You should take a look at the browsing feature and how it works under different circumstances.
Description:
- Browsing have been fairly slow in Media Portal. In my view from the "My Videos" browsing as this is the one I use mainly.
My current Movie folder contains of mostly network shares. Some might even be offline.
I downloaded the latest SVN and found a few "bottlenecks" that I fixed (or botched) to my usage. These are by all means no solution for the general but was enough for me. Browsing now is almost instant like it is when I browse in windows.
Here are the slow spots I found:
Class: FileInformation.cs,
Function: ctor()
Info: This section was really bad on shares that was offline (if folder):
I uncommented this as I have no need for this info. (still havent seen any negative effects from this change)
If I left it uncommented, several seconds would pass just in these 2 calls if the folder(share) was "offline". So I commented it out.
Class: VirtualDirectory.cs,
Function: IsProtectedShare()
Info: Function isnt very slow, but I noticed a minor slowness. It calls to the Share class but I solved that by adding a static counter/bool in the Share class. If there is no pincodes, there is no need to call down into this class. First line in IsProtectedShare I replaced with
- of course I might be missing some deeper connections here, but code is a notch more efficient.
Class: VirtualDirectory.cs,
Function: GetDirectory()()
Info: This function was the one encapsulating the 2 above (the "main slow function").
I did one change in this class. That was below the for loop for folders:
I uncommented the
line. Dont think I really need it.
That function really need some speeding up (being called as often as it is). Some caching maybe.
I also uncommented the "hide hidden folders" check. Instead I hide "$RECYCLE.BIN" as that is the only hidden share I really need hidden.
Those thing fixed it to my usage though.
The slowness i general seems to be on folders.
Dont crucify me for doing this. Just needed to tweak the program for my usage
Started on: 2007-04-16
last update: 2007-04-16
Summary:
- You should take a look at the browsing feature and how it works under different circumstances.
Description:
- Browsing have been fairly slow in Media Portal. In my view from the "My Videos" browsing as this is the one I use mainly.
My current Movie folder contains of mostly network shares. Some might even be offline.
I downloaded the latest SVN and found a few "bottlenecks" that I fixed (or botched) to my usage. These are by all means no solution for the general but was enough for me. Browsing now is almost instant like it is when I browse in windows.
Here are the slow spots I found:
Class: FileInformation.cs,
Function: ctor()
Info: This section was really bad on shares that was offline (if folder):
Code:
try
{
CreationTime = info.CreationTime;
ModificationTime = info.LastWriteTime;
}
catch (Exception) { }
I uncommented this as I have no need for this info. (still havent seen any negative effects from this change)
If I left it uncommented, several seconds would pass just in these 2 calls if the folder(share) was "offline". So I commented it out.
Class: VirtualDirectory.cs,
Function: IsProtectedShare()
Info: Function isnt very slow, but I noticed a minor slowness. It calls to the Share class but I solved that by adding a static counter/bool in the Share class. If there is no pincodes, there is no need to call down into this class. First line in IsProtectedShare I replaced with
Code:
if (!Share.HasPinCode) return false;
Class: VirtualDirectory.cs,
Function: GetDirectory()()
Info: This function was the one encapsulating the 2 above (the "main slow function").
I did one change in this class. That was below the for loop for folders:
I uncommented the
Code:
Utils.SetThumbnails(ref item);
That function really need some speeding up (being called as often as it is). Some caching maybe.
I also uncommented the "hide hidden folders" check. Instead I hide "$RECYCLE.BIN" as that is the only hidden share I really need hidden.
Those thing fixed it to my usage though.
The slowness i general seems to be on folders.
Dont crucify me for doing this. Just needed to tweak the program for my usage