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: 7531"><p>Hey Frodo, found out the source of the problem. BinarySearch assumes a sorted list, so it was only by chance that the order allowed it to work in My Videos but not Pictures.</p><p></p><p>Fix: </p><p>[code]public void SetExtensions(ArrayList extensions)</p><p>{</p><p> if (extensions==null) return;</p><p> m_extensions = extensions;</p><p> m_extensions.Sort();</p><p>}[/code]</p><p>[code]public void AddExtension(string strExtension)</p><p>{</p><p> if (m_extensions == null)</p><p> m_extensions = new ArrayList();</p><p> m_extensions.Add(strExtension);</p><p> m_extensions.Sort();</p><p>}[/code]</p><p></p><p>Unfortunately now any speed improvements are lost. Scratch this as an improvement.</p></blockquote><p></p>
[QUOTE="Q3aiml, post: 7531"] Hey Frodo, found out the source of the problem. BinarySearch assumes a sorted list, so it was only by chance that the order allowed it to work in My Videos but not Pictures. Fix: [code]public void SetExtensions(ArrayList extensions) { if (extensions==null) return; m_extensions = extensions; m_extensions.Sort(); }[/code] [code]public void AddExtension(string strExtension) { if (m_extensions == null) m_extensions = new ArrayList(); m_extensions.Add(strExtension); m_extensions.Sort(); }[/code] Unfortunately now any speed improvements are lost. Scratch this as an improvement. [/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