8000 fix: streamlining the client scope update by shawkins · Pull Request #40808 · keycloak/keycloak · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: streamlining the client scope update #40808

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

Merged
merged 1 commit into from
Jul 7, 2025
Merged

Conversation

shawkins
Copy link
Contributor
@shawkins shawkins commented Jun 30, 2025

Prevents the client scope update logic from deleting, then re-adding the same client scope.

closes: #40805

cc @yelhouti

closes: keycloak#40805

Signed-off-by: Steve Hawkins <shawkins@redhat.com>
@yelhouti
Copy link
Contributor
yelhouti commented Jul 1, 2025

@shawkins thank you for taking the time I really appreciate it.
I didn't test it yet, but this exactly what I wanted to try once I saw the time this took when profiling.
I will let you know by how much it improved performance.

@shawkins
Copy link
Contributor Author

@shawkins thank you for taking the time I really appreciate it. I didn't test it yet, but this exactly what I wanted to try once I saw the time this took when profiling. I will let you know by how much it improved performance.

For me using ~250 simple realms like your script created it cut the import time by about 35%.

Copy link
Contributor
@vramik vramik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thank you

@shawkins shawkins requested a review from pedroigor July 1, 2025 14:51
@yelhouti
Copy link
Contributor
yelhouti commented Jul 7, 2025

@shawkins I can confirm this reduces import-realm duration from 49sec to 35sec when you have ~1000 realms.

@shawkins
Copy link
Contributor Author
shawkins commented

Based upon the review from @yelhouti I'll go ahead and merge this - actually still need a review from @keycloak/maintainers

@shawkins shawkins enabled auto-merge (squash) July 7, 2025 11:18
Copy link
Contributor
@ahus1 ahus1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving based on @vramik's review

@shawkins shawkins merged commit d74e71e into keycloak:main Jul 7, 2025
76 checks passed
@shawkins
Copy link
Contributor Author
shawkins commented Jul 7, 2025

@vmuzikar @ahus1 @vramik should this be backported?

@ahus1
Copy link
Contributor
ahus1 commented Jul 7, 2025

-1 as it is a performance optimization only, and the cost of backporting and potential breakage is IMHO not worth it. If any, only backport it to 26.3. Backporting might help in catching regressions and making the person reporting it happy.

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

Successfully merging this pull request may close these issues.

Optimize createClients on realm import
4 participants
0