Skip to content

Conversation

kilink
Copy link
Contributor

@kilink kilink commented Sep 4, 2024

Avoid allocating empty arrays in a few places in ResolvableType.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 4, 2024
Avoid allocating empty arrays in a few places in ResolvableType.
@kilink kilink force-pushed the resolvabletype-empty-array-allocation branch from d1d7fd2 to 9a46879 Compare September 4, 2024 06:50
@sdeleuze sdeleuze self-assigned this Sep 4, 2024
@sdeleuze sdeleuze added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Sep 4, 2024
@sdeleuze sdeleuze added this to the 6.2.0-RC1 milestone Sep 4, 2024
@sdeleuze sdeleuze closed this in f88c314 Sep 4, 2024
@sdeleuze
Copy link
Contributor

sdeleuze commented Sep 4, 2024

Merged, thanks.

On a very simple webapp, this change reduces the number of ResolvableType[] instances from 439 to 395. On bigger apps, it will likely lead to bigger gains.

@kilink
Copy link
Contributor Author

kilink commented Sep 4, 2024

Merged, thanks.

On a very simple webapp, this change reduces the number of ResolvableType[] instances from 439 to 395. On bigger apps, it will likely lead to bigger gains.

I should have included some data, in the app I was looking at a heap dump for, I saw ~700 duplicate empty arrays coming from ResolvableType, or about 11kb of waste.

@kilink kilink deleted the resolvabletype-empty-array-allocation branch September 4, 2024 16:26
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

Successfully merging this pull request may close these issues.

3 participants