Skip to content

[ISSUE]: Slow start of program after refactoring program initialization #4867

@pnxs

Description

@pnxs

Prerequisites

  • I have written a descriptive issue title
  • I have searched issues to ensure it has not already been reported

GitVersion package

GitVersion.Tool

GitVersion version

=6.5.0

Operating system

Linux

What are you seeing?

Starting with GitVersion 6.5.0 I noticed that the program need several seconds to even display the CLI help or version.
Started with strace it reveals that it is doing a stat for every file of my working-directory. I'm working with yocto and have millions of files in around 350848 subdirs.

I checked the changes and isolated the commit that starts this ill behavior:
71bb08d

What is expected?

GitVersion not stat'ing every file...

Steps to Reproduce

I'm working with yocto and have millions of files in around 350848 subdirs in the working directory.
I checked with GitVersion 6.5.0 and reversed the commit, after that it starts fast again.
You can use "strace -f -e stat" to see if files other the GitVersions own and libs are stat'ed.

RepositoryFixture Test

No response

Output log or link to your CI build (if appropriate).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions