Update TaxonomyService.cs

Improves, but does not fully resolve, the performance problems described in issue #5663.
This commit is contained in:
mvarblow
2015-09-14 17:01:08 -04:00
parent 85c4a99c13
commit 8690278bed

View File

@@ -266,9 +266,9 @@ namespace Orchard.Taxonomies.Services {
}
var termPartRecordIds = termList.Select(t => t.Term.TermRecord.Id).ToArray();
_processingEngine.AddTask(_shellSettings, _shellDescriptorManager.GetShellDescriptor(), "ITermCountProcessor.Process", new Dictionary<string, object> { { "termPartRecordIds", termPartRecordIds } });
if (termPartRecordIds.Length > 0) {
_processingEngine.AddTask(_shellSettings, _shellDescriptorManager.GetShellDescriptor(), "ITermCountProcessor.Process", new Dictionary<string, object> { { "termPartRecordIds", termPartRecordIds } });
}
}
public IContentQuery<TermsPart, TermsPartRecord> GetContentItemsQuery(TermPart term, string fieldName = null) {