Netflix / archaius

Library for configuration management API
Apache License 2.0
2.46k stars 485 forks source link

Lambdas for default methods in config proxy object are re-created for each proxy instance, instead of each proxy class #684

Open rgallardo-netflix opened 11 months ago

rgallardo-netflix commented 11 months ago

When instantiating a config proxy through ConfigProxyFactory, the lambdas that allow access to default methods in the interface are re-created for each proxy object, even though they are only unique to the entire class.

This is normally not an issue, but if a client creates many (in the hundreds) instances of proxies for the same class (for different prefixes, for example) they can end up consuming a large amount of metaclass space.