questions about build speed/output
Added by Tim S about 4 years ago
Hi,
I apologize for this probably very naive question, but I've spent a lot of time searching the docs, jambase, etc. and am not sure what I'm doing wrong. I attached a jamfile that was created from VCProjToJamfile.bat. It's set up to build the wx_core static library from the wxWidgets distribution. When I build the vcproj in Visual Studio, it finished in about 45 seconds. When I try from jam, just building a subset of the source takes over 4 minutes. Also, I don't see any output at all the whole time until it finishes, is this normal behavior or should I see the .cpp files listed as they are built? Thanks so much for any info.
jamfile.jam (24.5 KB)
Replies (4)
RE: questions about build speed/output
-
Added by Joshua Jensen about 4 years ago
The .vcproj and makefiles for wxWidgets use precompiled headers. You can accomplish the same thing by adding the following in a location before the Library line.
PrecompiledHeader core : ../../src/common/dummy.cpp wx/wxprec.h : $(SRCS) ;
In terms of output... because Jam is multithreaded, output from multiple processes gets interleaved. It can be hard to determine which process gave you which warning/error. JamPlus has a patch to collect the output from a process and display it all at once.
I share your frustration at lack of immediate output. I want to find a way to make this better. In the meantime, you can get more frequent output by splitting up the batch compilation command's size:
BatchCompileGroupSize core : 5 ;
This will batch just 5 files at a time to the compiler. On my machine, that makes the build of the core library a little over 2 seconds slower than batching them all to the compiler. It keeps the visuals more responsive, though.
Josh
RE: questions about build speed/output
-
Added by Tim S about 4 years ago
Thanks for the explanations, adding the precompiled header made the build as fast or faster then visual studio, and the BatchCompileGroupSize showed more output. Thanks for your work in making jamplus possible!
RE: questions about build speed/output
-
Added by Tim S about 4 years ago
Just found something interesting, if I create a visual studio workspace using the JamToWorkspace script, and build the project from within Visual Studio, I can remove the BatchCompileGroupSize rule and I still see the .cpp files being listed as they are built (although not JamPlus progress output). It almost seems like Visual Studio has some kind of way of being notified from cl.exe as files are built, although that's just a guess.
RE: questions about build speed/output
-
Added by Joshua Jensen over 3 years ago
Just a note about this. JamPlus 0.4 has a new actions option, 'screenoutput', that will show output as it happens for the given action. This means one process's output will interleave with other multiprocess output, but the end result is more frequent visuals.
Josh
(1-4/4)