This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user