optimize image processor when gdi can be skipped

This commit is contained in:
Luke Pulverenti
2013-11-07 10:57:12 -05:00
parent d609d0edec
commit 2fc662c9e9
7 changed files with 153 additions and 70 deletions

View File

@@ -363,6 +363,7 @@ namespace MediaBrowser.Server.Implementations.IO
{
if (string.Equals(i, e.FullPath, StringComparison.OrdinalIgnoreCase))
{
Logger.Debug("Watcher ignoring change to {0}", e.FullPath);
return true;
}
@@ -370,6 +371,7 @@ namespace MediaBrowser.Server.Implementations.IO
var parent = Path.GetDirectoryName(i);
if (string.Equals(parent, e.FullPath, StringComparison.OrdinalIgnoreCase))
{
Logger.Debug("Watcher ignoring change to {0}", e.FullPath);
return true;
}
@@ -379,10 +381,18 @@ namespace MediaBrowser.Server.Implementations.IO
parent = Path.GetDirectoryName(i);
if (string.Equals(parent, e.FullPath, StringComparison.OrdinalIgnoreCase))
{
Logger.Debug("Watcher ignoring change to {0}", e.FullPath);
return true;
}
}
if (i.StartsWith(e.FullPath, StringComparison.OrdinalIgnoreCase) ||
e.FullPath.StartsWith(i, StringComparison.OrdinalIgnoreCase))
{
Logger.Debug("Watcher ignoring change to {0}", e.FullPath);
return true;
}
return false;
}))
@@ -390,12 +400,6 @@ namespace MediaBrowser.Server.Implementations.IO
return;
}
if (tempIgnorePaths.Contains(e.FullPath, StringComparer.OrdinalIgnoreCase))
{
Logger.Debug("Watcher requested to ignore change to " + e.FullPath);
return;
}
Logger.Info("Watcher sees change of type " + e.ChangeType + " to " + e.FullPath);
//Since we're watching created, deleted and renamed we always want the parent of the item to be the affected path