Actions
Bug #2692
closedCache Spring IoC name resolution to make Rudder faster
Status:
Released
Priority:
1 (highest)
Assignee:
Category:
Architecture - Code maintenance
Target version:
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:
Description
As the coed base of Rudder is growing (exponentially ?), the code get slower and slower
After some tinkering and looking at the plumbing, it appears that the dependency injection is the culprit (at least on my system).I did some benchmark :
- creating the form for searching nodes take, without JRebel activated, takes 800 ms (rendering is longer due to other issues still non searched for)
- by simply naming all the bean used with injection, the forms takes 160 ms to be created
In a nutshell, changing from
private[this] lazy val nodeGroupRepository = inject[NodeGroupRepository]
to
private[this] lazy val nodeGroupRepository = inject[NodeGroupRepository]("ldapNodeGroupRepository")
for each inject dramatically fastens the code.
Alas, naming object with String is very fragile and error prone (no check at compile time, difficult refactoring, and no detection before it breaks, in production when we get unlucky)
I'm still investigating on the subject
Updated by Nicolas CHARLES over 12 years ago
- Status changed from New to Pending technical review
- % Done changed from 0 to 100
Applied in changeset aee7949847568f85dafc0614616436ac1ce0135d.
Updated by Nicolas CHARLES over 12 years ago
With this commit, the form creating time is only 8 ms, and the full display is 75 ms
Updated by François ARMAND over 12 years ago
- Subject changed from Rudder is getting slower and slower to Cache Spring IoC name resolution to make Rudder faster
That seems cool !
Thank you really much Nico for that one. That make me really want to throws Spring, more than the fact that it's a huge bloaty monster.
Updated by François ARMAND over 12 years ago
- Status changed from Pending technical review to Released
Actions