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

Reduce storage reads, especially for map storage #15038

Closed
ahus1 opened this issue Oct 19, 2022 · 0 comments · Fixed by #15039
Closed

Reduce storage reads, especially for map storage #15038

ahus1 opened this issue Oct 19, 2022 · 0 comments · Fixed by #15039
Assignees
Labels
area/storage Indicates an issue that touches storage (change in data layout or data manipulation) kind/enhancement Categorizes a PR related to an enhancement status/triage
Milestone

Comments

@ahus1
Copy link
Contributor

ahus1 commented Oct 19, 2022

Description

When analyzing #14944, I found that there are a lot of reads for the realm and the clients when accessing the admin UI.

For this issue, assess some low-hanging fruits there, especially:

  • don't retrieve the admin realm to just find out if the current realm is the admin realm.
  • when iterating over permissions related to a client, retrieve the client once and then check all permissions for the client instead of retrieving the client for every single permission

Motivation

Optimize performance, especially for JPA map storage as each of those queries will (1) run a dirty check, and (2) will hit the DB to retrieve the record

@ahus1 ahus1 added kind/enhancement Categorizes a PR related to an enhancement status/triage labels Oct 19, 2022
@ahus1 ahus1 self-assigned this Oct 19, 2022
@ahus1 ahus1 added area/storage Indicates an issue that touches storage (change in data layout or data manipulation) team/storage-sig labels Oct 19, 2022
ahus1 added a commit to ahus1/keycloak that referenced this issue Oct 20, 2022
@stianst stianst added this to the 20.0.0 milestone Oct 25, 2022
andre-nascimento6791 pushed a commit to andre-nascimento6791/keycloak-cnd-work that referenced this issue Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/storage Indicates an issue that touches storage (change in data layout or data manipulation) kind/enhancement Categorizes a PR related to an enhancement status/triage
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants