Understood.
One more thing: Caching of User result in UserStore.FindByIdAsync will have a high impact, because that is #1 by count. It's easy enough to cache it there, but I am afraid that it will have unforeseen consequences if I forget to update the cache when a given user is updated. Besides AccountController and AccountAppService, is there any other place where I should invalidate the userid from the cache?
Where does the application query UserRole and UserOrganizationUnit? Why can't I cache those too?
Wow, there are so many calls to UserStore.FindByIdAsync and UserStore.GetRolesAsync in a single page load. Time to do some caching!
I have about 800 users right now. Which is why the execution counts look very high to me, because it's not a lot of users.
I don't use UserOrganizationUnit. I will try the caching you mentioned, thanks!
Reopening. This did not actually fix the issue with numerous queries. I can't tell if it's Abp making them or Zero. Below is a screenshot with Azure with the most numerous queries (sorted descending). The one on the bottom is a query from my application. I don't have multi-tenantcy enabled, my permissions are very straightforward, I have two roles, one user and one admin and that's about it. The amount of database requests is much too high. What can I do about this?
The tables being queries are: AbpUsers AbpRoles The original query above is #3 in the list A join on AbpUserRoles and AbpRoles AbpRoleClaims AbpUserClaims
Ah, yeah, that is probably the case. I disabled notifications too, so it works for me.
It worked well for me. It's a bit more involved than changing permissions, but it actually removes signalr calls.
Thank you very much!
I see. I have very simple permissioning that doesn't change. Is there any way to increase this cache's ttl so as to minimize these queries?
Intersting. I don't see how that is possible. That is a manual/interactive administrator action, so I don't see how it's being executed 14 times per minute. Could there be another place? It looks like it's happening on page loads.