InstanceImpl currently resolves all the matching beans beforehand. This is very often unnecessary because users rarely use Instance<Object>, e.g. to iterate over all accessible beans (might be a huge set and although we usually cache the resolution there are other "expensive" operations). This could improve the performance of org.jboss.weld.manager.api.WeldManager.instance() and javax.enterprise.inject.spi.BeanManager.createInstance() respectively. |