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

Mitigate slow performance of findLibrary #941

Merged
merged 1 commit into from
Feb 7, 2024
Merged

Mitigate slow performance of findLibrary #941

merged 1 commit into from
Feb 7, 2024

Conversation

melix
Copy link
Collaborator

@melix melix commented Feb 7, 2024

This commit introduces a cache for the version catalog lookups. It appears that Gradle's findLibrary method is extremely inefficient, causing dramatic build time increases, in particular in multiproject setups.

The fix isn't great though, since it involves a static cache, but for now there's no better API until Gradle 8.7 is shipped. Even so, ideally there should be an API to get the library coordinates directly.

See gradle/gradle#27444
See gradle/gradle#25226

Fixes #932

@melix melix added the type: bug Something isn't working label Feb 7, 2024
@melix melix added this to the 4.3.2 milestone Feb 7, 2024
@melix melix requested a review from alvarosanchez February 7, 2024 14:13
@melix melix self-assigned this Feb 7, 2024
@CLAassistant
Copy link

CLAassistant commented Feb 7, 2024

CLA assistant check
All committers have signed the CLA.

This commit introduces a cache for the version catalog lookups. It
appears that Gradle's findLibrary method is extremely inefficient,
causing dramatic build time increases, in particular in multiproject
setups.

The fix isn't great though, since it involves a static cache, but
for now there's no better API until Gradle 8.7 is shipped. Even so,
ideally there should be an API to get the library coordinates directly.

See gradle/gradle#27444
See gradle/gradle#25226

Fixes #932
Copy link

sonarqubecloud bot commented Feb 7, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
90.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@melix melix merged commit 91064d6 into master Feb 7, 2024
7 checks passed
@melix melix deleted the cc/issue-932 branch February 7, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

build time increased after updating from plugin version 4.1.2 to 4.2.x
3 participants