This commit is contained in:
@@ -73,6 +73,15 @@ Ensure all modern best practice security is properly enabled on helloayanova.com
|
||||
FUTURE ITEMS:
|
||||
=============
|
||||
|
||||
DB INDEXES / PERFORMANCE
|
||||
- Absolutely have to fine tune the indexes before release.
|
||||
- Found a lot of useful info on examining index usage with postgres, there are some built in stats in Postgres that show how indexes are being used and or not used properly or usefully
|
||||
- A quick search should show many ways to query for used tables etc
|
||||
- Monitor unussed indexes: https://jmorano.moretrix.com/2014/02/postgresql-monitor-unused-indexes/
|
||||
- Many queries to do with tuning: https://gist.github.com/ruckus/5718112
|
||||
- Useful for learning: https://www.datadoghq.com/blog/postgresql-monitoring/
|
||||
-
|
||||
|
||||
CLIENT SHELL
|
||||
|
||||
Once I can make the client I need to get into that and make the shell and initial interface with enough stuff to do basic testing initially
|
||||
|
||||
@@ -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