Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance degradation for TransactionInterceptor [SPR-9802] #14435

Closed
spring-projects-issues opened this issue Sep 15, 2012 · 2 comments
Closed
Assignees
Labels
in: data type: bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Sep 15, 2012

Ray opened SPR-9802 and commented

We tried to upgrade Spring framework from 2.5.5 to 3.1.1, during performance test we found that TransactionInterceptor will add some performance overhead because introduce of following method:
org.springframework.transaction.interceptor.TransactionAspectSupport.methodIdentification(java.lang.reflect.Method,java.lang.Class)

This new method will call Class.getDeclaredMethods() instead of using the method passed in directly.

If there are multiple transaction pointcuts defined and invoked in one call, the performance will be affected badly.

Can we do fallback support as 2.5.5 or add cache support for the method instead of call Class.getDeclaredMethods() each time?


Affects: 3.1.1

Issue Links:

  • #14606 Performance degradation for after Spring 3 ("is duplicated by")
  • #11975 Transaction names should use the concrete class name

Referenced from: commits 89b3651, 2c8b7fe, 49294c9, bbfc807

2 votes, 5 watchers

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 16, 2012

Gopal Patwa commented

it seems this feature was added as part of this jira

https://jira.springsource.org/browse/SPR-7317

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 26, 2012

Juergen Hoeller commented

I've fixed this through direct use of targetClass.getName() + "." + method.getName(), always exposing the signature against the concrete target class. This is as efficient as the original code was in 2.5.5, with largely the same result as after the #11975 change. And where it differs (e.g. in case of methods inherited from base classes), the result should actually be more meaningful than before (since the concrete class is what we dispatch to).

Juergen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data type: bug
Projects
None yet
Development

No branches or pull requests

2 participants