home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Another GetDirectory/My Videos Slow Display
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Q3aiml" data-source="post: 7458"><p>On My Movies with ~400+ files (stacking disabled) it takes a noticeable 3-4 seconds to list. I think there is an easy solution involving GetDirectory and SetThumbnails.</p><p></p><ul> <li data-xf-list-type="ul">Create a duplicate SetThumbnails copied from the first one, for testing I just named it SetThumbnailsTest.</li> <li data-xf-list-type="ul">Change SetThumbnailsTest to also accept a string[] files as an argument</li> <li data-xf-list-type="ul">For the three IO.File.Exists run a BinarySearch on the files arg instead (Don't edit the one after GetThumb or if it is a folder). So (System.IO.File.Exists(strThumb)) -> (Array.BinarySearch(test, strThumb) < 0)</li> <li data-xf-list-type="ul">Update the call in GetDirectory used under IsValidExtension while enumerating files in the directory to call the new function, passing strFiles as the second argument</li> </ul><p></p><p>For me this reduced listing time to under one second, still noticeable but alot better.</p><p></p><p>I have only been looking at the source for about three hours, and have never programmed C# prior in my life, so if what I did simply breaks the function feel free to flame me. I have tested it, so i'm only worried about it not showing the thumbnails correctly - like if I changed what the function actually did.</p><p></p><p>Anyways hope that helps</p><p></p><p><strong>Edit:</strong> <em>Feel free to lynch me for not using the handy dandy template.</em></p></blockquote><p></p>
[QUOTE="Q3aiml, post: 7458"] On My Movies with ~400+ files (stacking disabled) it takes a noticeable 3-4 seconds to list. I think there is an easy solution involving GetDirectory and SetThumbnails. [list][*]Create a duplicate SetThumbnails copied from the first one, for testing I just named it SetThumbnailsTest. [*]Change SetThumbnailsTest to also accept a string[] files as an argument [*]For the three IO.File.Exists run a BinarySearch on the files arg instead (Don't edit the one after GetThumb or if it is a folder). So (System.IO.File.Exists(strThumb)) -> (Array.BinarySearch(test, strThumb) < 0) [*]Update the call in GetDirectory used under IsValidExtension while enumerating files in the directory to call the new function, passing strFiles as the second argument[/list] For me this reduced listing time to under one second, still noticeable but alot better. I have only been looking at the source for about three hours, and have never programmed C# prior in my life, so if what I did simply breaks the function feel free to flame me. I have tested it, so i'm only worried about it not showing the thumbnails correctly - like if I changed what the function actually did. Anyways hope that helps [b]Edit:[/b] [i]Feel free to lynch me for not using the handy dandy template.[/i] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Another GetDirectory/My Videos Slow Display
Contact us
RSS
Top
Bottom