- May 8, 2008
- 49
- 4
- Home Country
- Canada
- Thread starter
- #11
Okay, i'll try fixing the database since doing a new database will takes hours and i'm pretty sure the end result will be the same.
I'll do that monday
I'll do that monday
What I think it's not database problem but cache building problem and files count in checked as default shared folder in Configuration.
Something like this:
In config check shared folder with many video files. Start MP.
Case 1 - You start with shared view, first load of files takes time if many files are there (cache is built for that folder), start some video there, it stops immediately.
Switch to database view. Start video there, it stops immediately (because of existing already built cache)
Case 2. You start with database view, it loads fast (no cache building), start video, stop takes time (no cache is built so MP builds default shared folder cache - this is a problem and it shouldn't do that here), then try again video, it stops fast
Could you test this or this is the problem you have?
[B]private void LoadDirectory(string newFolderName, bool useCache, IList<string> watchedFiles)[/B]
.
.
.
for (int x = 0; x < itemlist.Count; ++x)
{
bool addItem = true;
GUIListItem item1 = itemlist[x];
[COLOR=Red] // This stack check causing big delay - needs rework
for (int y = 0; y < itemlist.Count; ++y)
{
GUIListItem item2 = itemlist[y];
if (x != y)
{
if (!item1.IsFolder || !item2.IsFolder)
{
if (!item1.IsRemote && !item2.IsRemote)
{
if (Util.Utils.ShouldStack(item1.Path, item2.Path))
{
if (String.Compare(item1.Path, item2.Path, true) > 0)
{
addItem = false;
// Update to reflect the stacked size
item2.FileInfo.Length += item1.FileInfo.Length;
}
}
}
}
}
}[/COLOR]
if (addItem)
{
string label = item1.Label;
if ((VirtualDirectory.IsValidExtension(item1.Path, Util.Utils.VideoExtensions, false)))
{
Util.Utils.RemoveStackEndings(ref label);
}
item1.Label = label;
itemfiltered.Add(item1);
}
}
.
.
.