[keycloak-dev] client query caches getting complicated
Bill Burke
bburke at redhat.com
Thu Feb 18 08:54:55 EST 2016
On 2/18/2016 5:05 AM, Stian Thorgersen wrote:
>
>
> On 18 February 2016 at 08:43, Marek Posolda <mposolda at redhat.com
> <mailto:mposolda at redhat.com>> wrote:
>
> On 18/02/16 08:07, Stian Thorgersen wrote:
>> Having two many joins (fetching everything about a realm in one
>> query) is probably going to be bad for performance, especially if
>> there are loads of clients and roles. There can also be large
>> difference between different vendors.
> Maybe clients and roles (and groups?) shouldn't be loaded eagerly
> with realm, but I guess most of the other stuff can be (ie.
> federation providers, identity providers, SMTP configurations
> etc). Also for clients we can eagerly load most of the stuff (ie.
> redirectUris, scopes ). ATM we eagerly preload whole realm in
> CachedRealm constructor, but we have fetchType.LAZY everywhere.
> IMO this is not optimal and would mean lot of SQL at startup
> during realm preload (I did not doublecheck myself).
>
>
> I don't really think it's a priority and I suspect performance might
> actually be worse if we do a lot of eager loading than lazy loading.
> Depends on how Hibernate loads it of course, but if it does it through
> a crazy join then performance will suffer.
We don't do EAGER SQL loading of clients. We just load every
client/role when a realm is loaded.
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-dev/attachments/20160218/3dcacb32/attachment.html
More information about the keycloak-dev
mailing list