Q
Q3aiml
Guest
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.
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
Edit: Feel free to lynch me for not using the handy dandy template.
- 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
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
Edit: Feel free to lynch me for not using the handy dandy template.