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

Speed up resolution of git provided properties for header content #874

Open
frawa opened this issue Jan 6, 2025 · 1 comment · May be fixed by #877
Open

Speed up resolution of git provided properties for header content #874

frawa opened this issue Jan 6, 2025 · 1 comment · May be fixed by #877
Labels
is:feature New feature

Comments

@frawa
Copy link

frawa commented Jan 6, 2025

Describe the feature

Using header properties provided from git, like license.git.copyrightLastYear, can be slow,
even used together with

<licenseSets>
  <licenseSet>
    <properties>
       <license.git.maxCommitsLookup>1</license.git.maxCommitsLookup>
    </properties>
...

That's because the two Property providers in com.mycila.maven.plugin.license.git use seperate JGit rev walks for (nearly) every property their provide, and all properties are eagerly provided.

For projects not using all provided properties to build header text this will result in unnecessary rev walks.

Any alternative you've considered ?

No.

@frawa frawa added the is:feature New feature label Jan 6, 2025
@frawa
Copy link
Author

frawa commented Jan 6, 2025

Playing with lazy evaluation of provided git properties, see frawa#1, now #877

On a project using only using license.git.copyrightLastYear and <license.git.maxCommitsLookup>1 I observe speedup for licence:check by a factor 3, from 15s down to 5s.
On a bigger project the speedup was 4, from 2min to 3s.

I wonder if that approach is worth being continued?

@frawa frawa linked a pull request Jan 8, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:feature New feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant