I am most of the way through converting incdir.sh to a C version, incdir.c.  I will probably submit a PR that just adds the .c file (without changing the build system). Then we can experiment with it and make sure we are comfortable before bringing it into the build.

I will first test with Cygwin where I was seeing 7 minutes (still too long).  I won't bother if there is no significant improvement.

Okay.. I have submitted the C version of incdir.sh and it is a lot faster.   That is PR 1148.  Please do review.

I using Cygwin which did not have the terrible performance as you are seeing under MSYS2.  I but I still got a substantial improvement, from 7 minutes down to 5 minutes and 20 seconds. That is 75% from the previous time.  I bet you do a lot better than that.  I believe it should be even faster than it was before (not forks at all!).

The new .c file is NOT yet hooked into the build system.  There are special instructions available in the PR 1148 comments under the Testing section.  Essentially, you override the definition of INCDIR as incdir.sh changing it to be incdir.exe (and, of course, you have to build incdir.exe manually).

One thing I noted when I measured that 5 min 20 sec build time is that a large part of the time is spent making dependencies.  For Linux, that uses the mkdeps.c version, but for Cywgin, it uses the script mkwindeps.sh.

As a comparison I did:

    - make clean
    - make

The dependencies only have to be recreated on the first build, not on subsequent builds.  In that case I get 3 minutes and 30 seconds.  So the Cygwin dependency generation vi mkwindeps.sh requires about 2 minutes by itself.



Reply via email to