This commit is contained in:
2020-05-13 19:17:17 +00:00
parent da716b7cb0
commit 2f58cab0a8
2 changed files with 13 additions and 21 deletions

View File

@@ -1,16 +1,6 @@
PRIORITY - ALWAYS Lowest level stuff first PRIORITY - ALWAYS Lowest level stuff first
=-=-=-=- =-=-=-=-
todo: why the fuck does it take so long fora job to start? Waht is the timer to check set to?
todo: BizRoles.cs seems to get hammered on every single request, is it efficient?
- Why is it not cached in some way?
- Look into Lazy initialization (i.e. private static readonly Lazy<IDictionary<string, string>> mappings ....etc)
- Maybe break it out into separate objects
if do so then ideally put them into the biz object responsible?
- it has to instantiate that anyway on any meaningful operation
or...is this worse than actually caching in a lifetime cache because it will need to load on every route hit whereas a lifteimte cache is just there from being loaded once?
--- ---
todo: API REFACTORING (note: workordercontroller / biz should be following all these rules so it's the template if need reference) todo: API REFACTORING (note: workordercontroller / biz should be following all these rules so it's the template if need reference)
todo: consider and then get rid of PATCH in all routes todo: consider and then get rid of PATCH in all routes

View File

@@ -10,6 +10,8 @@ namespace AyaNova.Biz
internal static class BizRoles internal static class BizRoles
{ {
//NOTE: this *is* efficient, it's static and initialized once only on startup the first time it's required and re-used forever afterwards until next reboot
internal static Dictionary<AyaType, BizRoleSet> roles = new Dictionary<AyaType, BizRoleSet>(); internal static Dictionary<AyaType, BizRoleSet> roles = new Dictionary<AyaType, BizRoleSet>();
static BizRoles() static BizRoles()