This commit is contained in:
2018-10-03 18:37:56 +00:00
parent aee2234092
commit 80b48791f7
2 changed files with 18 additions and 31 deletions

View File

@@ -10,7 +10,7 @@ using Microsoft.Extensions.Logging;
using Microsoft.EntityFrameworkCore;
using AyaNova.Util;
using AyaNova.Models;
using System.Diagnostics;
//using System.Diagnostics;
namespace AyaNova.Biz
@@ -336,24 +336,10 @@ namespace AyaNova.Biz
var watch = new System.Diagnostics.Stopwatch();//###################### PROFILING
watch.Start();//###################### PROFILING
// var watch = new System.Diagnostics.Stopwatch();//###################### PROFILING
// watch.Start();//###################### PROFILING
watch.Start();//###################### PROFILING
//EF CORE METHOD
// //Build the return list from the remaining matching objects list
// foreach (AyaTypeId i in OrderedMatchingObjects)
// {
// SearchResult SR = new SearchResult();
// SR.Name = BizObjectNameFetcher.Name(i, ct);//THIS IS CAUSING ALL THE SLOWNESS IN RETURNING SEARCH RESULTS
// SR.Id = i.ObjectId;
// SR.Type = i.ObjectType;
// ResultList.Add(SR);
// }
//TEST DIRECT METHOD ##############
//Get names using best performing technique
using (var command = ct.Database.GetDbConnection().CreateCommand())
{
@@ -371,11 +357,8 @@ namespace AyaNova.Biz
}
}
watch.Stop();//###################### PROFILING
var TimeToBuildSearchResultReturnList = watch.ElapsedMilliseconds;//###################### PROFILING
// watch.Stop();//###################### PROFILING
// var TimeToBuildSearchResultReturnList = watch.ElapsedMilliseconds;//###################### PROFILING
return ResultList;
}