Skip to content

CDI: improve PackagingFilter performance by avoiding costly opeation in loop#9381

Merged
matthiasblaesing merged 1 commit into
apache:masterfrom
NicolaIsotta:packagingfilter-perf
May 13, 2026
Merged

CDI: improve PackagingFilter performance by avoiding costly opeation in loop#9381
matthiasblaesing merged 1 commit into
apache:masterfrom
NicolaIsotta:packagingfilter-perf

Conversation

@NicolaIsotta
Copy link
Copy Markdown
Contributor

@NicolaIsotta NicolaIsotta commented May 5, 2026

Discovered this bottleneck while working on other things.
The current version recreates the ClasspathInfo every iteration of the loop, causing a remarkable slowdown; this PR introduces a lazily-inizialized resusable ClasspathInfo.
In one of my test cases (@Inject on a java.util.Map), the boost was ≃ 10x (time spent in the method went down from 2 secs to less than 200 millis).

@matthiasblaesing matthiasblaesing added Java EE/Jakarta EE [ci] enable enterprise job enterprise [ci] enable enterprise job ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels May 7, 2026
@apache apache locked and limited conversation to collaborators May 7, 2026
@apache apache unlocked this conversation May 7, 2026
Copy link
Copy Markdown
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks sane to me. Thank you!

@matthiasblaesing
Copy link
Copy Markdown
Contributor

I intent to merge this sometime next week unless there are objections.

@matthiasblaesing matthiasblaesing added this to the NB31 milestone May 13, 2026
@matthiasblaesing matthiasblaesing merged commit c536252 into apache:master May 13, 2026
29 checks passed
@NicolaIsotta NicolaIsotta deleted the packagingfilter-perf branch May 13, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) enterprise [ci] enable enterprise job Java EE/Jakarta EE [ci] enable enterprise job performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants