-
Notifications
You must be signed in to change notification settings - Fork 288
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
GitProvenance is very slow getting committers on a large Git history #4210
Comments
Oh wow; picture really speaks volumes here; thanks for including that! The And is called from this group of methods. rewrite/rewrite-core/src/main/java/org/openrewrite/marker/GitProvenance.java Lines 146 to 218 in 5815658
I agree with you that we should do something to improve performance here, or add a cut off past which we stop looking at committers; say a couple months. Either way thanks for calling this out! |
Figured provide some more context: both the Maven plugin and Gradle plugin call the same method in openrewrite/rewrite to determine the GitProvenance. We're considering adding a 90 day committer history look back cut off to limit how many commits are evaluated while still having some committer history available to recipes. Not yet saying we'll definitely land on that, but figured give you that update such that you know we're working on it. |
What version of OpenRewrite are you using?
I am using
What did you see instead?
After the following line of output
there is a delay of several minutes when I run locally. When I noticed this, I attached a profiler. The GitProvenance calculation of the committers takes forever. In the following screenshot that consumes around 7 minutes (after I noticed the delay, so add some minutes).
![grafik](https://private-user-images.githubusercontent.com/406876/333262576-b30a4def-0960-4989-b939-6b7e06cbe1ba.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk2NTk5MDEsIm5iZiI6MTcxOTY1OTYwMSwicGF0aCI6Ii80MDY4NzYvMzMzMjYyNTc2LWIzMGE0ZGVmLTA5NjAtNDk4OS1iOTM5LTZiN2UwNmNiZTFiYS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjI5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYyOVQxMTEzMjFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01MGVhZTliYzE4NjUxYzZmYjc5OWRhZTk0ODllNzI3ZGJkMzQ0NjI2MmFiYjdiMjY2MjIxODIyYmMwZmQ0ZDUyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.JRYPNVHC6v__1naguMnXbM9aGXh0d-mo6r6B61ImCQA)
The git repo has 67K commits and 63K committed files (currently). I'm on Windows.
Maybe that information is useful when running on moderne.io infrastructure, but for local execution of most recipes that's probably not useful and should be improved.
The text was updated successfully, but these errors were encountered: