This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

AnnouncementAnnouncement Module

Collapse

No announcement yet.

performance issues due to use of reflection API in dependency injectionPage Title Module

performance issues due to use of reflection API in dependency injection

Dec 7th, 2010, 11:43 AM

I am using Spring DI in domain objects using @Configurable and @Resource annotations. The rate of domain object creation is very high in my app. Since DI uses reflection, I have found that it results in high memory usage and high GC. I have confirmed this using java heap tool. This impacts the performance of the system and I am forced to change the design.

Kindly note that I have a large variety of such domain objects which are created frequently and it is not possible to specify all the attributes to be injected by Spring, in a configureBean() as the list varies.

Has anyone faced similar performance issues. Is yes, kindly share any resolution ideas.