Skip to content

Improve performance by maintaining sort of application listeners [SPR-17308] #21841

Closed
@spring-projects-issues

Description

@spring-projects-issues

Samuel Bratton opened SPR-17308 and commented

There's a slight but measurable performance hit due to sorting application listeners in AbstractApplicationEventMulticaster.java, even with as few as 2 listeners. The cost is incurred on every call to getApplicationListeners()when listeners are sorted (

) By maintaining a sorted list as entries are added/removed this cost is reduced. There is a proposed change which can be mad a pull request here: https://github.com/sebratton/spring-framework/tree/sort-application-listeners


Affects: 4.3.19, 5.0.9

Issue Links:

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: duplicateA duplicate of another issuetype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions