IFS-HSR / SConsolidator

An Eclipse plug-in for the build system SCons (scons.org).
24 stars 10 forks source link

Slow build when compiling multiple files. #49

Open augustbering opened 6 years ago

augustbering commented 6 years ago

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.

marcelhuberfoo commented 6 years ago

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

Please use Oxygen as your test platform.

augustbering commented 6 years ago

Thanks for the swift reply!

marcelhuberfoo commented 6 years ago

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.

augustbering commented 6 years ago

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.

augustbering commented 6 years ago

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 :-)

marcelhuberfoo commented 6 years ago

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.

augustbering commented 6 years ago

OK, here's some output: output.txt

marcelhuberfoo commented 6 years ago

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

Darnor commented 6 years ago

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:

Thanks in advance.