Browsing speed improvement (under different circumstances) (1 Viewer)

wolf5

New Member
January 9, 2008
3
0
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):
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;
- 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
Code:
Utils.SetThumbnails(ref item);
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 :)
 

gizzard

Portal Member
January 14, 2007
72
22
Home Country
Iceland Iceland
This did speed up my network browsing as well for my videos.

Thanks for the input.

But dose anybody know how to do the same for My Music?
 

Paranoid Delusion

Moderation Manager
  • Premium Supporter
  • June 13, 2005
    13,062
    2,978
    Cheshire
    Home Country
    United Kingdom United Kingdom
    Usually just tell people to switch from shares to title view (uses database) within the MP GUI for each module.
     

    Marcusb

    Retired Team Member
  • Premium Supporter
  • February 16, 2005
    1,995
    29
    Melbourne
    Usually just tell people to switch from shares to title view (uses database) within the MP GUI for each module.

    There are some situations where Shares view is necessary though. I think anything that could speed up shares view is a welcome change.

    Anyone else have a chance to test these changes?
    I'm away for another couple of weeks, so unable to.

    Marcus.
     

    Al_Capone

    MP Donator
  • Premium Supporter
  • September 26, 2006
    527
    19
    Home Country
    Norway Norway
    Yes, a faster share-view would be great !
    maybe database could be used for that ?
     

    wolf5

    New Member
    January 9, 2008
    3
    0
    Probably the same hacks as I did above. Just put in some breakpoints and step thru those classes when browsing network shares (make sure some of the shares are offline). You will soon find places where you can improve it.
     

    rtv

    Retired Team Member
  • Premium Supporter
  • April 7, 2005
    3,622
    301
    Osnabruck
    Home Country
    Germany Germany
    Offline shares aren't slow in recent SVNs...

    Leaving out core functionality might not be an option for most people.
     

    Users who are viewing this thread

    Top Bottom