Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localize Make the PermissionAppService.GetAsync method slow #6373

Closed
Nokecy opened this issue Nov 27, 2020 · 9 comments · Fixed by #6480
Closed

Localize Make the PermissionAppService.GetAsync method slow #6373

Nokecy opened this issue Nov 27, 2020 · 9 comments · Fixed by #6480
Assignees
Milestone

Comments

@Nokecy
Copy link
Contributor

Nokecy commented Nov 27, 2020

1500 permission items:
remove Localize before--10s+
remove Localize after 300ms+

@Nokecy
Copy link
Contributor Author

Nokecy commented Nov 27, 2020

Maybe PermissionStore.IsGrantedAsync should be used

@Nokecy Nokecy changed the title Localize Make the method slow Localize Make the PermissionAppService.GetAsync method slow Nov 27, 2020
@maliming maliming self-assigned this Nov 27, 2020
@maliming maliming added this to the 4.1-preview milestone Nov 27, 2020
@maliming
Copy link
Member

Thanks for the feedback, I will check.

@maliming
Copy link
Member

maliming commented Dec 1, 2020

hi @Nokecy I didn't find any performance issues. We used caching. Can you share a project?

@Nokecy
Copy link
Contributor Author

Nokecy commented Dec 2, 2020

I did some more tests, when too many localized resources do not exist, the speed is too slow。

@Nokecy
Copy link
Contributor Author

Nokecy commented Dec 2, 2020

In addition, replacing Permission Grant Repository with PermissionStore can improve 2-3s @maliming

@maliming
Copy link
Member

maliming commented Dec 2, 2020

too many localized resources do not exist, the speed is too slow。

I'll test, but why is there a not exist situation? What is your use case?

replacing Permission Grant Repository with PermissionStore can improve 2-3s

The PermissionStore is using cache but PermissionGrantRepository is not.

@Nokecy
Copy link
Contributor Author

Nokecy commented Dec 2, 2020

I will change my project and add missing items

Maybe PermissionStore.IsGrantedAsync should be used

Does it need to be changed here? I can PR

@maliming
Copy link
Member

maliming commented Dec 4, 2020

I did the PR.#6480

@hikalkan
Copy link
Member

Actually, PermissionManagementProvider is only used when you manage permission (change permission of a user/role on UI) and it may be a bit slow. It bypasses cache to be able to work with the actual data source. However, using cache for reads seems no problem. I will accept the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants