<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I created a branch that changes this behaviour:<br><br><a href="https://github.com/stuartwdouglas/core/tree/newbeans">https://github.com/stuartwdouglas/core/tree/newbeans</a><br><br>However there are some TCK issues:<br><br><a href="https://jira.jboss.org/browse/CDITCK-194">https://jira.jboss.org/browse/CDITCK-194</a><br><br>Stuart<div><br><div><div>On 14/11/2010, at 10:44 AM, Stuart Douglas wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>After doing some more profiling I think we can massively reduce startup time for a large number of beans. <br><br>At the moment we add an @New bean for every managed bean, while according to the spec I think this is only necessary for beans that are actually injected into an @New injection point. I performed a quick test where I removed the @New beans (and skipped the tests) and in the 5000 bean case it reduced the AS startup time form 90s to 60s (this is actually a 50% speedup as the AS takes 30s to start with a 5000 class deployment without weld), and reduces the memory usage by a further 20Mb (bringing the total saving so far to 100Mb). This speedup will probably be less for smaller deployment, because parts of the startup process are O(n^2) on the number of beans (in particular TypeSafeResolver.findMatching).<br><br>Is my interpretation of the spec correct? The spec actually says that these @New beans that do not match an injection point still exist but are disabled, which as far as I can tell is the same as just not creating them. <br><br><br>Stuart</div></blockquote></div><br></div></body></html>