Memflex icon indicating copy to clipboard operation
Memflex copied to clipboard

Performance Issues

Open OdeToCode opened this issue 13 years ago • 4 comments

  1. FlexRoleProvider::DeleteRole uses _roleStore.GetUsersInRole(roleName).Any(). Will be painful when the number of users in the system is large.
  2. FlexRoleProvider::IsUserInRoll uses GetUsersInRole(roleName).Any(...) - same potential problem.

OdeToCode avatar Oct 04 '12 00:10 OdeToCode

Maybe the Future() feature of https://github.com/loresoft/EntityFramework.Extended will help on the EF side.

AntiGameZ avatar Oct 07 '12 02:10 AntiGameZ

Thanks - I will take a look.

OdeToCode avatar Oct 08 '12 15:10 OdeToCode

I don't think it makes sense to put the ICollection Users property on the IFlexRole interface because in a document world it makes much more sense to store the roles that a user belongs to in the user document. If we remove that property from IFlexRole and just use the GetRolesForUser call to get a list of roles for a specific user, it will be up to the store on how to persist role membership.

I am kind of thinking that it would be better to just merge IFlexUserStore and IFlexRoleStore into a single IFlexMembershipStore and let the provider make the decisions on how it stores things.

Thoughts?

ejsmith avatar Oct 12 '12 20:10 ejsmith

Eric: Yes, I think that idea has some merit. Will try to investigate this week.

OdeToCode avatar Oct 15 '12 14:10 OdeToCode