PERF: Adding various logging calls related to startup performance

--HG--
branch : 1.x
This commit is contained in:
Renaud Paquay
2011-05-27 14:19:46 -07:00
parent fdbe7fd454
commit 7a35d03902

View File

@@ -32,14 +32,18 @@ namespace Orchard.FileSystems.Dependencies {
}
public void StoreDependencies(IEnumerable<DependencyDescriptor> dependencyDescriptors) {
Logger.Information("Storing module dependency file.");
var newDocument = CreateDocument(dependencyDescriptors);
var previousDocument = ReadDocument(PersistencePath);
if (CompareXmlDocuments(newDocument, previousDocument)) {
Logger.Debug("Existing document is identical to new one. Skipping save.");
return;
}
else {
WriteDocument(PersistencePath, newDocument);
}
WriteDocument(PersistencePath, newDocument);
Logger.Information("Done storing module dependency file.");
}
public IEnumerable<string> GetVirtualPathDependencies(DependencyDescriptor descriptor) {