[libc++] much longer build time of my project using libc++ 5.0 vs 3.5.2

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[libc++] much longer build time of my project using libc++ 5.0 vs 3.5.2

Boris Kolpackov via cfe-dev
Hi, my project has been using libc++/c++abi 3.5.2 for two years, and recently I am upgrading it to libc++/c++abi 5.0, only to find that the build time for our project increased dramatically, from 100 minutes to 160 minutes on a 6-core intel-CPU, same situation for both debug and release build. The compiler is clang 5.0. The comparison is pretty fair - same machine and compiler, same codebase, the only difference is the C++ headers. Is there a way to improve? It's kind of blocker for our adoption of libc++/c++abi 5.0, as it takes too long for our developers to build. 

Thanks a lot. 


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [libc++] much longer build time of my project using libc++ 5.0 vs 3.5.2

Boris Kolpackov via cfe-dev
Did you try to use precompiled header to avoid having to reparse everything anytime you compile a file ? On my project, it usually greatly reduce the compile time.

Le 17 nov. 2017 à 21:04, chen hsu via cfe-dev <[hidden email]> a écrit :

Hi, my project has been using libc++/c++abi 3.5.2 for two years, and recently I am upgrading it to libc++/c++abi 5.0, only to find that the build time for our project increased dramatically, from 100 minutes to 160 minutes on a 6-core intel-CPU, same situation for both debug and release build. The compiler is clang 5.0. The comparison is pretty fair - same machine and compiler, same codebase, the only difference is the C++ headers. Is there a way to improve? It's kind of blocker for our adoption of libc++/c++abi 5.0, as it takes too long for our developers to build. 

Thanks a lot. 

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [libc++] much longer build time of my project using libc++ 5.0 vs 3.5.2

Boris Kolpackov via cfe-dev
In reply to this post by Boris Kolpackov via cfe-dev
Do you have some sort of test case?  For example, a standalone .cpp file which includes a bunch of libc++ headers, and which now takes much more time to compile?

It would be interesting to see where this regressed, if it did.

-Dimitry

On 17 Nov 2017, at 21:04, chen hsu via cfe-dev <[hidden email]> wrote:

Hi, my project has been using libc++/c++abi 3.5.2 for two years, and recently I am upgrading it to libc++/c++abi 5.0, only to find that the build time for our project increased dramatically, from 100 minutes to 160 minutes on a 6-core intel-CPU, same situation for both debug and release build. The compiler is clang 5.0. The comparison is pretty fair - same machine and compiler, same codebase, the only difference is the C++ headers. Is there a way to improve? It's kind of blocker for our adoption of libc++/c++abi 5.0, as it takes too long for our developers to build. 

Thanks a lot. 

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

signature.asc (230 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [libc++] much longer build time of my project using libc++ 5.0 vs 3.5.2

Boris Kolpackov via cfe-dev


On Sat, Nov 18, 2017 at 6:15 AM, Dimitry Andric via cfe-dev <[hidden email]> wrote:
Do you have some sort of test case?  For example, a standalone .cpp file which includes a bunch of libc++ headers, and which now takes much more time to compile?

It would be interesting to see where this regressed, if it did.

+1. I would love to see a test case here. 
 

-Dimitry

On 17 Nov 2017, at 21:04, chen hsu via cfe-dev <[hidden email]> wrote:

Hi, my project has been using libc++/c++abi 3.5.2 for two years, and recently I am upgrading it to libc++/c++abi 5.0, only to find that the build time for our project increased dramatically, from 100 minutes to 160 minutes on a 6-core intel-CPU, same situation for both debug and release build. The compiler is clang 5.0. The comparison is pretty fair - same machine and compiler, same codebase, the only difference is the C++ headers. Is there a way to improve? It's kind of blocker for our adoption of libc++/c++abi 5.0, as it takes too long for our developers to build. 

Thanks a lot. 

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [libc++] much longer build time of my project using libc++ 5.0 vs 3.5.2

Boris Kolpackov via cfe-dev

merging thread.. I have precompilation configuration for my project, and by enabling it, the build time is 100 minutes. but since precompilation introduces some other issues (cmake doesn't support precompilation so we have to use some custom script, which is not perfect), we still prefer to building the code without precompilation, if any other option is available.


I don't have a test case yet, but our use of c++ stl is quite common, vector, wstring, map, set, etc. wstring is used a lot since the code was ported from Windows to linux. On windows side we use msbuild, which only takes 50 minutes to build the whole project. Of course this is not comparable due to compiler difference, but we are targeting to make Linux build time to be close to that of Windows. 


From: Eric Fiselier <[hidden email]>
Sent: Saturday, November 18, 2017 8:20:37 PM
To: Dimitry Andric
Cc: chen hsu; cfe-dev
Subject: Re: [cfe-dev] [libc++] much longer build time of my project using libc++ 5.0 vs 3.5.2
 


On Sat, Nov 18, 2017 at 6:15 AM, Dimitry Andric via cfe-dev <[hidden email]> wrote:
Do you have some sort of test case?  For example, a standalone .cpp file which includes a bunch of libc++ headers, and which now takes much more time to compile?

It would be interesting to see where this regressed, if it did.

+1. I would love to see a test case here. 
 

-Dimitry

On 17 Nov 2017, at 21:04, chen hsu via cfe-dev <[hidden email]> wrote:

Hi, my project has been using libc++/c++abi 3.5.2 for two years, and recently I am upgrading it to libc++/c++abi 5.0, only to find that the build time for our project increased dramatically, from 100 minutes to 160 minutes on a 6-core intel-CPU, same situation for both debug and release build. The compiler is clang 5.0. The comparison is pretty fair - same machine and compiler, same codebase, the only difference is the C++ headers. Is there a way to improve? It's kind of blocker for our adoption of libc++/c++abi 5.0, as it takes too long for our developers to build. 

Thanks a lot. 

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [libc++] much longer build time of my project using libc++ 5.0 vs 3.5.2

Boris Kolpackov via cfe-dev
For my sanity, and because this has come up before more than once, I need to ask:

If you're testing on OS X, can you confirm that the old clang setup isn't defaulting to libstdc++ 4.2?
This happens often --- and accidentally -- with older platforms or with older Clang toolsets.

Other users have reported a ~20% compile time slowdown after switching from libstdc++ 4.2 to libc++.

That being said, I'm going to try and get some builds set up to attempt to reproduce this.

/Eric


On Mon, Nov 20, 2017 at 4:29 PM, chen hsu <[hidden email]> wrote:

merging thread.. I have precompilation configuration for my project, and by enabling it, the build time is 100 minutes. but since precompilation introduces some other issues (cmake doesn't support precompilation so we have to use some custom script, which is not perfect), we still prefer to building the code without precompilation, if any other option is available.


I don't have a test case yet, but our use of c++ stl is quite common, vector, wstring, map, set, etc. wstring is used a lot since the code was ported from Windows to linux. On windows side we use msbuild, which only takes 50 minutes to build the whole project. Of course this is not comparable due to compiler difference, but we are targeting to make Linux build time to be close to that of Windows. 


From: Eric Fiselier <[hidden email]>
Sent: Saturday, November 18, 2017 8:20:37 PM
To: Dimitry Andric
Cc: chen hsu; cfe-dev
Subject: Re: [cfe-dev] [libc++] much longer build time of my project using libc++ 5.0 vs 3.5.2
 


On Sat, Nov 18, 2017 at 6:15 AM, Dimitry Andric via cfe-dev <[hidden email]> wrote:
Do you have some sort of test case?  For example, a standalone .cpp file which includes a bunch of libc++ headers, and which now takes much more time to compile?

It would be interesting to see where this regressed, if it did.

+1. I would love to see a test case here. 
 

-Dimitry

On 17 Nov 2017, at 21:04, chen hsu via cfe-dev <[hidden email]> wrote:

Hi, my project has been using libc++/c++abi 3.5.2 for two years, and recently I am upgrading it to libc++/c++abi 5.0, only to find that the build time for our project increased dramatically, from 100 minutes to 160 minutes on a 6-core intel-CPU, same situation for both debug and release build. The compiler is clang 5.0. The comparison is pretty fair - same machine and compiler, same codebase, the only difference is the C++ headers. Is there a way to improve? It's kind of blocker for our adoption of libc++/c++abi 5.0, as it takes too long for our developers to build. 

Thanks a lot. 

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev




_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [libc++] much longer build time of my project using libc++ 5.0 vs 3.5.2

Boris Kolpackov via cfe-dev
So I've managed to roughly reproduce similar results on Linux building LLVM w/ libc++ 3.5 and libc++ ToT.
On my machine I saw build times of 700 vs 800 seconds respectively (to build a small portion of LLVM).

Initially I though the cause may have been the Lib C header wrappers, but taking them out had no effect.
I'll keep looking...

/Eric

On Tue, Nov 21, 2017 at 10:59 AM, Eric Fiselier <[hidden email]> wrote:
For my sanity, and because this has come up before more than once, I need to ask:

If you're testing on OS X, can you confirm that the old clang setup isn't defaulting to libstdc++ 4.2?
This happens often --- and accidentally -- with older platforms or with older Clang toolsets.

Other users have reported a ~20% compile time slowdown after switching from libstdc++ 4.2 to libc++.

That being said, I'm going to try and get some builds set up to attempt to reproduce this.

/Eric


On Mon, Nov 20, 2017 at 4:29 PM, chen hsu <[hidden email]> wrote:

merging thread.. I have precompilation configuration for my project, and by enabling it, the build time is 100 minutes. but since precompilation introduces some other issues (cmake doesn't support precompilation so we have to use some custom script, which is not perfect), we still prefer to building the code without precompilation, if any other option is available.


I don't have a test case yet, but our use of c++ stl is quite common, vector, wstring, map, set, etc. wstring is used a lot since the code was ported from Windows to linux. On windows side we use msbuild, which only takes 50 minutes to build the whole project. Of course this is not comparable due to compiler difference, but we are targeting to make Linux build time to be close to that of Windows. 


From: Eric Fiselier <[hidden email]>
Sent: Saturday, November 18, 2017 8:20:37 PM
To: Dimitry Andric
Cc: chen hsu; cfe-dev
Subject: Re: [cfe-dev] [libc++] much longer build time of my project using libc++ 5.0 vs 3.5.2
 


On Sat, Nov 18, 2017 at 6:15 AM, Dimitry Andric via cfe-dev <[hidden email]> wrote:
Do you have some sort of test case?  For example, a standalone .cpp file which includes a bunch of libc++ headers, and which now takes much more time to compile?

It would be interesting to see where this regressed, if it did.

+1. I would love to see a test case here. 
 

-Dimitry

On 17 Nov 2017, at 21:04, chen hsu via cfe-dev <[hidden email]> wrote:

Hi, my project has been using libc++/c++abi 3.5.2 for two years, and recently I am upgrading it to libc++/c++abi 5.0, only to find that the build time for our project increased dramatically, from 100 minutes to 160 minutes on a 6-core intel-CPU, same situation for both debug and release build. The compiler is clang 5.0. The comparison is pretty fair - same machine and compiler, same codebase, the only difference is the C++ headers. Is there a way to improve? It's kind of blocker for our adoption of libc++/c++abi 5.0, as it takes too long for our developers to build. 

Thanks a lot. 

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev





_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [libc++] much longer build time of my project using libc++ 5.0 vs 3.5.2

Boris Kolpackov via cfe-dev

Thank you, Eric. I could confirm that libcxx/libcxxabi is used in our project, not libstdc++. We basically put its headers and custom-built (with -fshort-wchar option) static lib into a directory, and have clang to use them. -stdlib=libc++ option is also specified. 


From: Eric Fiselier <[hidden email]>
Sent: Tuesday, November 21, 2017 7:17:09 PM
To: chen hsu
Cc: Dimitry Andric; cfe-dev; Jean-Daniel
Subject: Re: [cfe-dev] [libc++] much longer build time of my project using libc++ 5.0 vs 3.5.2
 
So I've managed to roughly reproduce similar results on Linux building LLVM w/ libc++ 3.5 and libc++ ToT.
On my machine I saw build times of 700 vs 800 seconds respectively (to build a small portion of LLVM).

Initially I though the cause may have been the Lib C header wrappers, but taking them out had no effect.
I'll keep looking...

/Eric

On Tue, Nov 21, 2017 at 10:59 AM, Eric Fiselier <[hidden email]> wrote:
For my sanity, and because this has come up before more than once, I need to ask:

If you're testing on OS X, can you confirm that the old clang setup isn't defaulting to libstdc++ 4.2?
This happens often --- and accidentally -- with older platforms or with older Clang toolsets.

Other users have reported a ~20% compile time slowdown after switching from libstdc++ 4.2 to libc++.

That being said, I'm going to try and get some builds set up to attempt to reproduce this.

/Eric


On Mon, Nov 20, 2017 at 4:29 PM, chen hsu <[hidden email]> wrote:

merging thread.. I have precompilation configuration for my project, and by enabling it, the build time is 100 minutes. but since precompilation introduces some other issues (cmake doesn't support precompilation so we have to use some custom script, which is not perfect), we still prefer to building the code without precompilation, if any other option is available.


I don't have a test case yet, but our use of c++ stl is quite common, vector, wstring, map, set, etc. wstring is used a lot since the code was ported from Windows to linux. On windows side we use msbuild, which only takes 50 minutes to build the whole project. Of course this is not comparable due to compiler difference, but we are targeting to make Linux build time to be close to that of Windows. 


From: Eric Fiselier <[hidden email]>
Sent: Saturday, November 18, 2017 8:20:37 PM
To: Dimitry Andric
Cc: chen hsu; cfe-dev
Subject: Re: [cfe-dev] [libc++] much longer build time of my project using libc++ 5.0 vs 3.5.2
 


On Sat, Nov 18, 2017 at 6:15 AM, Dimitry Andric via cfe-dev <[hidden email]> wrote:
Do you have some sort of test case?  For example, a standalone .cpp file which includes a bunch of libc++ headers, and which now takes much more time to compile?

It would be interesting to see where this regressed, if it did.

+1. I would love to see a test case here. 
 

-Dimitry

On 17 Nov 2017, at 21:04, chen hsu via cfe-dev <[hidden email]> wrote:

Hi, my project has been using libc++/c++abi 3.5.2 for two years, and recently I am upgrading it to libc++/c++abi 5.0, only to find that the build time for our project increased dramatically, from 100 minutes to 160 minutes on a 6-core intel-CPU, same situation for both debug and release build. The compiler is clang 5.0. The comparison is pretty fair - same machine and compiler, same codebase, the only difference is the C++ headers. Is there a way to improve? It's kind of blocker for our adoption of libc++/c++abi 5.0, as it takes too long for our developers to build. 

Thanks a lot. 

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev





_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev