Skip to content

Normalization takes a very long time #1266

Closed

Description

@JoshSchreuder

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!

Activity

  1. JoshSchreuder commented on Jul 26, 2017

    @JoshSchreuder
    Author

    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?

  2. asbjornu commented on Aug 2, 2017

    @asbjornu
    Member

    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).

  3. stale commented on Jun 29, 2019

    @stale

    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.

  4. JoshSchreuder commented on Jul 17, 2019

    @JoshSchreuder
    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.

  5. stale commented on Oct 15, 2019

    @stale

    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.

  6. asbjornu commented on Oct 15, 2019

    @asbjornu
    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.

  7. stale commented on Jan 13, 2020

    @stale

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions