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 improvement for TransactionSynchronizationManager.getSynchronizations() [SPR-6999] #11664

Closed
spring-projects-issues opened this issue Mar 17, 2010 · 3 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Martin Aubele opened SPR-6999 and commented

TransactionSynchronizationManager.getSynchronizations() is a bottleneck in our Liferay Portal:

List is sorted even if empty. During the whole function an array and several lists are created whithout any need.

Please see the attachement for a fix.

Thanks, Martin


Affects: 3.0.1

Attachments:

Referenced from: commits 5dc59aa, 19b4618

@spring-projects-issues
Copy link
Collaborator Author

Martin Aubele commented

Patch for TransactionSynchronizationManager

@spring-projects-issues
Copy link
Collaborator Author

Martin Aubele commented

Also the call of thread locals should be minimized. Thats the reason for inlining the (!isSynchronizationActive()) check.

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

I optimized this based on your suggestions for 3.0.2, not only in TransactionSynchronizationManager but also in specific places of AbstractPlatformTransactionManager and WebSphereUowTransactionManager.

The sorting was already optimized a couple of weeks ago, actually, through an OrderComparator.sort(...) call which implicitly only sorts for Lists with >1 elements.

Juergen

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: core Issues in core modules (aop, beans, core, context, expression) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.0.2 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants