I've been using MediaPortal a lot lately and while I like it for the most part, I noticed that it was quite slow reading directory information over the network. Others have posted about this problem also, so I thought I'd look into it.
Here is what I came up with - instead of using .NET to get the directory information, I use the win32 api directly and get the file attributes that way - this keeps the code from going to the drive multiple times for each file and speeds it up quite a bit, but I also took out the SetThumbnails calls which are also very inefficient and seem to be redundant.
I've been running it on my system for a couple of weeks and it has been stable and navigating the folders is much faster - maybe 10 times faster.
Here is what I came up with - instead of using .NET to get the directory information, I use the win32 api directly and get the file attributes that way - this keeps the code from going to the drive multiple times for each file and speeds it up quite a bit, but I also took out the SetThumbnails calls which are also very inefficient and seem to be redundant.
I've been running it on my system for a couple of weeks and it has been stable and navigating the folders is much faster - maybe 10 times faster.