mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
Shaving off a few microseconds per content item import.
This commit is contained in:
parent
49c772bf25
commit
999a10b6e4
@ -98,13 +98,14 @@ namespace Orchard.Recipes.Providers.Executors {
|
||||
var nextIdentity = importContentSession.GetNextInBatch();
|
||||
while (nextIdentity != null) {
|
||||
var itemId = "";
|
||||
if (elementDictionary[nextIdentity.ToString()].HasAttributes) {
|
||||
itemId = elementDictionary[nextIdentity.ToString()].FirstAttribute.Value;
|
||||
var nextIdentityValue = nextIdentity.ToString();
|
||||
if (elementDictionary[nextIdentityValue].HasAttributes) {
|
||||
itemId = elementDictionary[nextIdentityValue].FirstAttribute.Value;
|
||||
}
|
||||
Logger.Information("Importing data item '{0}' (item {1}/{2}).", itemId, itemIndex + 1, elementDictionary.Count);
|
||||
try {
|
||||
_orchardServices.ContentManager.Import(
|
||||
elementDictionary[nextIdentity.ToString()],
|
||||
elementDictionary[nextIdentityValue],
|
||||
importContentSession);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
|
Loading…
Reference in New Issue
Block a user