While profiling keycloak I noticed that the validator factory is using 3mb of heap memory, mostly in BeanMetaDataManager. It might be worth looking at trying to reduce this.