abp icon indicating copy to clipboard operation
abp copied to clipboard

Getting permission list too slow

Open aitting opened this issue 1 year ago • 4 comments

api:

PermissionAppService.GetAsync

problem code:

DisplayName = permission.DisplayName?.Localize(StringLocalizerFactory)

private PermissionGrantInfoDto CreatePermissionGrantInfoDto(PermissionDefinition permission)
{
    return new PermissionGrantInfoDto {
        Name = permission.Name,
        DisplayName = permission.DisplayName?.Localize(StringLocalizerFactory),
        ParentName = permission.Parent?.Name,
        AllowedProviders = permission.Providers,
        GrantedProviders = new List<ProviderInfoDto>()
    };
}

The more permission lists there are, the slower the code execution.

We have approximately 40+permission groups and 200+permissions.

aitting avatar Sep 12 '24 10:09 aitting

Make sure the Localization texts of permissions are exists

realLiangshiwei avatar Sep 16 '24 03:09 realLiangshiwei

I don't think this is the solution to the problem

Make sure the Localization texts of permissions are exists

aitting avatar Sep 20 '24 09:09 aitting

you can give it a try

realLiangshiwei avatar Sep 23 '24 03:09 realLiangshiwei

Make sure the Localization texts of permissions are exists

Get it! Thank you very munch!

JontyMin avatar Sep 25 '24 09:09 JontyMin

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 26 '25 04:04 stale[bot]