Our Spring configuration contains about 1200 beans, and we use component-scan/@Autowired. If we exported the ApplicationContext as an Xml (and still used @Autowired), we sav
I did a naive benchmark using XML, annotation, and Java config. The results were surprising (Java config was slower). I have no idea whether this would be relevant in your situation, benchmarks being what they are...
http://www.jroller.com/kenwdelong/entry/is_spring_javaconfig_faster
I would guess a bit less, because no parsing will have ho happen (the annotations are 'parsed' with reflection, the xml - with an xml parser).
That, however, should not be a reason to choose one configuration option over the other. Startup time is not important for performance.
I actually tried this a while back and depressingly it was not faster.. or at least not perceivable faster. In some cases when I actually measured it was slower (ever so slightly). I wish I had numbers but it was one of those quick tests for my own benefit. I also didn't have 1200 beans but about 200.
I also noticed mixing XML and Java config gave the worst performance (ever so slightly).
What I have found to be the bottleneck in my Spring bootup time is Hibernate. I'm doing another project with much of the same config w/o Hibernate using JDBC and the bootup time is about 1/3.
The difference is likely not between annotations and XML, but instead it'll be the startup performance hit of using component-scanning, which is slow. If you add component-scanning to your XML version, you should find that it's just as slow.