MediaPortal Forums HTPC/MediaCenter

Sponsored Ads

Go Back   MediaPortal Forum » MediaPortal TV-Server 1 » Help on Development » Development

Development You want to code something for the TV-Server? Share it in here!

Reply
 
LinkBack Thread Tools Display Modes
Old 2008-04-26, 19:06   #1 (permalink)
Portal User
 
Join Date: Jan 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts


Default Browsing speed improvement (under different circumstances)

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

Last edited by wolf5; 2008-04-29 at 00:21. Reason: wrong forum
wolf5 is offline   Reply With Quote
Old 2008-06-20, 16:04   #2 (permalink)
Portal User
 
Join Date: Feb 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts


Default

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?
saint is offline   Reply With Quote
Old 2008-06-20, 16:21   #3 (permalink)
Super Moderator
 
Paranoid Delusion's Avatar
 
Join Date: Jun 2005
Location: Cheshire UK
Posts: 4,989
Thanks: 54
Thanked 121 Times in 119 Posts

Country:

My System

Default

Usually just tell people to switch from shares to title view (uses database) within the MP GUI for each module.
Paranoid Delusion is online now   Reply With Quote
Old 2008-06-20, 20:59   #4 (permalink)
Super Moderator
 
Join Date: Feb 2005
Location: Melbourne
Posts: 1,833
Thanks: 51
Thanked 21 Times in 21 Posts

Country:

My System

Send a message via ICQ to Marcusb
Default

Quote:
Originally Posted by Paranoid Delusion View Post
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.
Marcusb is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible channel change speed improvement vur Improvement Suggestions 6 2008-02-26 08:04
Weather improvement THDBASED Improvement Suggestions 3 2007-12-05 11:54
Improvement of WinLIRC support possible? fschnabel Improvement Suggestions 7 2007-10-28 21:34
Improvement for the home screen Jean-Marc Improvement Suggestions 0 2007-04-06 02:08
Minimize to tray freezes MP under some circumstances in My TV toer 0.2.0.0 RC4 Release and SVN Bugs 3 2006-07-02 16:34


All times are GMT +1. The time now is 22:41.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by BBpixel ©2004-2008, jvbPlugin

Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress