Skip to content

Normalization takes a very long time #1266

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

Closed
JoshSchreuder opened this issue Jul 26, 2017 · 7 comments
Closed

Normalization takes a very long time #1266

JoshSchreuder opened this issue Jul 26, 2017 · 7 comments
Labels

Comments

@JoshSchreuder
Copy link

JoshSchreuder commented Jul 26, 2017

Not sure if this belongs here or in the GitTools.Core repo so apologies in advance.

I'm investigating our long running builds in Jenkins - found that the GitVersion step takes 6+ minutes to execute. When I run it locally on the build server it is nearly instantaneous, as there is no build server detection.

Anyway, I loaded up GV 4 to test and log out, and found it took 6.39 minutes in the normalization step:

2017-07-26 11:37:23		INFO [07/26/17 11:37:23:42] End: Normalizing git directory for branch 'origin/js.buildspeed' (Took: 383,852.08ms)

Perhaps unconventionally we have a LOT of branches (most of which need to be deleted as they have been merged already 😞 ), and this step runs through all of them doing this over and over

2017-07-26 11:37:23		  INFO [07/26/17 11:37:23:40] Skipping update of 'refs/remotes/origin/a-branch' as it already matches the remote ref.

Question - how do I make this quicker, and is it a bug or a failing on my end for having so many branches?

I assume that by deleting the branches that the time taken will increase, but is the normalization step required given I can run the command locally on the build server and get the same output nearly instantly?

Thanks in advance!

@JoshSchreuder
Copy link
Author

JoshSchreuder commented Jul 26, 2017

I've deleted my 450+ merged branches and it's quick again (~1 min! 😄 )

Still, it's going to take longer and longer as the branch list grows - anything I can do besides keeping the branch list small?

@asbjornu
Copy link
Member

asbjornu commented Aug 2, 2017

I assume @JakeGinnivan's work in #1243 will make everything GitVersion does faster, so there's hope. But 450 branches is a high number and I would recommend you to just delete branches immediately after they are merged (excluding mater and develop, of course).

@stale
Copy link

stale bot commented Jun 29, 2019

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 29, 2019
@JoshSchreuder
Copy link
Author

This is still an issue by the way, even on 5.0 beta.

With repo normalisation = ~7 minutes
Without repo normalisation (eg. setting env variable JENKINS_URL= per #1701) = ~40 seconds

Of course, without it my version is not detected correctly, so this is not a real solution :)

I don't know if there's any plans to implement the in memory stuff mentioned, so I guess I might need to look for alternative solutions.

@stale stale bot removed the stale label Jul 17, 2019
@stale
Copy link

stale bot commented Oct 15, 2019

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 15, 2019
@asbjornu
Copy link
Member

@JoshSchreuder, can you please try with the latest beta? #1838 contains some performance improvements, but I'm unsure whether they affect the issue you're seeing or not.

@stale stale bot removed the stale label Oct 15, 2019
@stale
Copy link

stale bot commented Jan 13, 2020

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants