IFS-HSR/SConsolidator

Slow build when compiling multiple files.

augustbering opened this issue · 9 comments

When invoking scons in a separate terminal, the build is always swift but when I invoke SConsolidator from within Eclipse and change more than one or two c++ files, it seems the output parsing window just hangs for 30s and the CPU spikes. The build works but there's something with the output parsing that isn't really setup properly and I don't know what it is. I've tried the same project on both Eclipse Neon and Oxygen with the same results.

Thank you for your request.
To be able to find the root cause, could you please answer the following questions:

  • Are these symptoms encountered during a Scons->Incremental build or a regular build?
  • Does it hang before building, during the build or afterwards regarding the console output?
  • How does your SConstruct file look like? (attach if possible)
  • How many files do you have in your project? (repo url for examination?)

Please use Oxygen as your test platform.

Thanks for the swift reply!

  • Regular build

  • After. It runs scons, I see the first line of output from compilation, then the console output just hangs for a while, and I see the Eclipse java process maxing out one cpu core for some time.

  • It's pretty complex I guess, and for an ARM system
    sconstr.zip

  • Perhaps 50-100 c files.

It might be a problem related to localpaths.py if this script relies on environment variables/settings.
When building from within Eclipse, the process environment is reduced to a minimum. Variables needed from the parent process of Eclipse need to be passed through explicitly, eg. if your 'outer' environment has MYVAR set, you need to add it in the environment section of Project->Properties->Scons using ${MYVAR}.
Additionally, try to use print statements to find out at which point in your SConstruct it hangs.

If it happens after scons read the whole SConscript, you would need to enable/increase verbosity of scons to find out more.

Maybe I was a bit unclear: the build actually succeeds after sconsolidator freezes for some time so it sounds strange to me that the environment should matter, the build should fail if it's incorrect, right?
Also, one curious thing is that the "clear console" button takes forever to clear the console, which makes me believe this has to do with something in Eclipse not handling long compiler output lines very well.

Yep, I added the -Q (quiet) switch and now the problem is gone. It's not ideal because I'd like to see the output but at least it doesn't freeze anymore :-)

Ok, thanks for clarifying.

A slow down is possible due to the fact that the build output is parsed and reformatted for being able to jump from a compiler error message in the console directly to the corresponding file.

I will check this behavior with my colleagues but I never noticed such a blocking slowdown caused by build output so far. Maybe there is a some string sequence in the build output which is very exhaustive for the parser.

If possible, attach or email us a complete build output to analyze the behavior of the parser. You will find email addresses in the commit logs.

OK, here's some output: output.txt

After a quick look at your output file, it might be related to your very long compilation lines which are truncated after 4096 characters.

I've been looking at the plug-in and tried to replicate the issue without success.

Could you provide us the SConsolidator Eclipse console output (with and without -Q) of a full build (cleaning the project before each build)?
The output should start with INFO: You can change the colors... up until Duration ... ms.

Also the following version information could be helpful:

  • SConsolidator
  • SCons
  • Eclipse platform

Thanks in advance.