This commit is contained in:
@@ -326,31 +326,26 @@ namespace AyaNova.Biz
|
||||
//MAXIMUM RESULTS FILTER
|
||||
//The theory is that it should be filtered BEFORE sorting so that you get the most random collection of results
|
||||
//As the results are not ranked so...
|
||||
var watch = new System.Diagnostics.Stopwatch();//###################### PROFILING
|
||||
watch.Start();//###################### PROFILING
|
||||
|
||||
if (searchParameters.MaxResults > 0)//0 = all results
|
||||
MatchingObjects = MatchingObjects.Take(searchParameters.MaxResults).ToList();
|
||||
watch.Stop();//###################### PROFILING
|
||||
var TimeToMaximumResultsFilter = watch.ElapsedMilliseconds;//###################### PROFILING
|
||||
watch.Reset();
|
||||
|
||||
watch.Start();//###################### PROFILING
|
||||
//Sort and group the matching objects list in return order
|
||||
//Customer.OrderBy(c => c.LastName).ThenBy(c => c.FirstName)
|
||||
var OrderedMatchingObjects = MatchingObjects.OrderBy(x => x.ObjectType).ThenByDescending(x => x.ObjectId);
|
||||
|
||||
watch.Stop();//###################### PROFILING
|
||||
var TimeToOrderMatchingObjects = watch.ElapsedMilliseconds;//###################### PROFILING
|
||||
watch.Reset();
|
||||
|
||||
|
||||
var watch = new System.Diagnostics.Stopwatch();//###################### PROFILING
|
||||
watch.Start();//###################### PROFILING
|
||||
|
||||
watch.Start();//###################### PROFILING
|
||||
//Build the return list from the remaining matching objects list
|
||||
//BUGBUG: THIS is what is taking all the time in the search FFS!
|
||||
foreach (AyaTypeId i in OrderedMatchingObjects)
|
||||
{
|
||||
SearchResult SR = new SearchResult();
|
||||
//SR.Name = "BLAH";
|
||||
SR.Name = BizObjectNameFetcher.Name(i, ct);//THIS IS PROBABLY CAUSING ALL THE SLOWNESS
|
||||
SR.Id = i.ObjectId;
|
||||
SR.Type = i.ObjectType;
|
||||
|
||||
Reference in New Issue
Block a user