In our application we are experiencing performance problems with component-scan. It is quite slow and its performance does not depend on number of classes in the scanned pac
What Spring does is to go through all the classes in the packages you give in the component-scan and if the class has Component, Repository or Service it registers a bean in the context. So the number of classes matters. You have to scan only packages witch contains annotated classes(scanning non annotated classes will take time too). Also you can use only one component scan tag and list all the packages. Using both xml and component scan should not be a problem as long as they don't duplicate.