Skip to content

Improve AddDependency performance by reducing unnecessary scanning for types in use#7482

Merged
sambsnyd merged 1 commit intomainfrom
optimize-dependencies
Apr 28, 2026
Merged

Improve AddDependency performance by reducing unnecessary scanning for types in use#7482
sambsnyd merged 1 commit intomainfrom
optimize-dependencies

Conversation

@sambsnyd
Copy link
Copy Markdown
Member

Once AddDependency finds a type it is looking for stop scanning other files in the same source set.

Data shows that 38% of the time spent on a large spring boot upgrade recipe is spent on AddDependency and up to 99% of that is in the scanning phase. The only thing in the scanning phase which could take so much time is the "onlyIfUsing" calculation.

@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Apr 28, 2026
@sambsnyd sambsnyd changed the title WIP Improve AddDependency performance by reducing unnecessary scanning for types in use Apr 28, 2026
@sambsnyd sambsnyd merged commit 28f4812 into main Apr 28, 2026
1 check passed
@sambsnyd sambsnyd deleted the optimize-dependencies branch April 28, 2026 04:00
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant