Menu
Home
Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
C# Community
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
VB.NET
Windows Forms
Need to speed up loading MP3 File Info into ListView
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="JohnH" data-source="post: 118973" data-attributes="member: 5139"><p>5000 items eh? You should really consider providing only a filtered list, and if no filter is applied limit the list to say 100 items.</p><p></p><p>With the current setup the number one speed improvement will be to use Control.BeginInvoke instead of Control.Invoke, this will allow the background thread to continue processing mp3s without waiting for the UI to update each item. Use ParameterizedThreadStart delegate to pass info over instead of the single set of module variables (songnamevar etc). </p><p></p><p>Reading the tag info from each mp3 is what takes most time here, if you're planning on making this program anything useful you have to place the info gathered from mp3 files into persistant storage, like a file or db, this will save considerable time later when starting the program again, and later you only need to get info from new files for example. Anyway, you can't expect anything else than maxing cpu when doing processor intensive tasks, though you can lower the thread priority from default Normal. </p><p></p><p>I don't think calling 'dosinglelist' in Catch block is a good call, if the cause of the Exception is not resolved you have a never-ending-loop. At least you should ask user for confirmation, to enable opting out.</p></blockquote><p></p>
[QUOTE="JohnH, post: 118973, member: 5139"] 5000 items eh? You should really consider providing only a filtered list, and if no filter is applied limit the list to say 100 items. With the current setup the number one speed improvement will be to use Control.BeginInvoke instead of Control.Invoke, this will allow the background thread to continue processing mp3s without waiting for the UI to update each item. Use ParameterizedThreadStart delegate to pass info over instead of the single set of module variables (songnamevar etc). Reading the tag info from each mp3 is what takes most time here, if you're planning on making this program anything useful you have to place the info gathered from mp3 files into persistant storage, like a file or db, this will save considerable time later when starting the program again, and later you only need to get info from new files for example. Anyway, you can't expect anything else than maxing cpu when doing processor intensive tasks, though you can lower the thread priority from default Normal. I don't think calling 'dosinglelist' in Catch block is a good call, if the cause of the Exception is not resolved you have a never-ending-loop. At least you should ask user for confirmation, to enable opting out. [/QUOTE]
Insert quotes…
Verification
Post reply
Home
Forums
VB.NET
Windows Forms
Need to speed up loading MP3 File Info into ListView
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top
Bottom