Details
-
Enhancement
-
Resolution: Unresolved
-
Minor
-
None
-
4.6.0.Final
-
None
Description
We noticed that every time a microprofile client is invoked, it queries all config propertyNames.
It's caused by the following method in org.jboss.resteasy.microprofile.client.RestClientDelegateBean:
private void getConfigProperties(String property, Map<String, Integer> configProperties) { // TODO If the property isn't an integer it will fail! for (String propertyName : config.getPropertyNames()) { if (propertyName.startsWith(property)) { Integer value = config.getValue(propertyName, Integer.class); String strippedProperty = propertyName.replace(property, ""); configProperties.put(strippedProperty, value); } } }
Calling config.getPropertyNames() on every client invocation could be quite an overhead (especially if one has multiple configSources with more resource-houngry ones amongst them (ie. ETCD, database...)).
If its possible it would be more efficient if only the keys needed by resteasy client would be loaded.