I've had some serious performance problems when browsing folders in MyVideos, it could take anywhere from 5 to 20 seconds to enter a folder. I've been doing some debugging and it turned out that SetIMDBThumbs used something like 4*n^2 operations (n being the number of files in a folder), when entering a folder and the stacking algorithm was n^2 as well. Since I have 300 files in my main movie folder, it took quite a while to do the initial processing when entering that folder.
I've changed SetIMDBThumbs to be linear in the number of operations (excluding DB ops), using just the functions that were already in the VideoDatabase class (plus 1 extra utility function). The stacking has been changed to a n*log n algorithm.
I'll be doing som testing over the next couple of days and submit a patch if everything works as expected.
Cheers
John
I've changed SetIMDBThumbs to be linear in the number of operations (excluding DB ops), using just the functions that were already in the VideoDatabase class (plus 1 extra utility function). The stacking has been changed to a n*log n algorithm.
I'll be doing som testing over the next couple of days and submit a patch if everything works as expected.
Cheers
John