From 020e1b21ba2c5e49436ef780a8d744017a53ebe5 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 1 Oct 2018 21:03:07 +0000 Subject: [PATCH] --- server/AyaNova/biz/Search.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/AyaNova/biz/Search.cs b/server/AyaNova/biz/Search.cs index a3a6b158..e351929f 100644 --- a/server/AyaNova/biz/Search.cs +++ b/server/AyaNova/biz/Search.cs @@ -328,7 +328,7 @@ namespace AyaNova.Biz //As the results are not ranked so... var watch = new System.Diagnostics.Stopwatch();//###################### PROFILING watch.Start();//###################### PROFILING - //BUGBUG: THIS is what is taking all the time in the queries FFS + if (searchParameters.MaxResults > 0)//0 = all results MatchingObjects = MatchingObjects.Take(searchParameters.MaxResults).ToList(); watch.Stop();//###################### PROFILING @@ -346,11 +346,12 @@ namespace AyaNova.Biz watch.Start();//###################### PROFILING - //Build the return list from the remaining matching objects list + //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 = BizObjectNameFetcher.Name(i, ct); + SR.Name = BizObjectNameFetcher.Name(i, ct);//THIS IS PROBABLY CAUSING ALL THE SLOWNESS SR.Id = i.ObjectId; SR.Type = i.ObjectType; ResultList.Add(SR);