distcc

Has anybody tried distributed compiling for e2studio? I'm experiencing very slow builds on my I7 laptop and was wondering if this could be helpful.

 

Update July 22:

I've exported a stripped down version of my project which builds in 45 seconds on my setup without modifications. It can be downloaded here.

  • In reply to Joost:

    (Backup) Replace the binaries of interest in the e2studio/Utilities folder with binaries from git-bash. I have almost completely moved away from e2studio and it has been awhile since I have done this so I may be miss-remembering which make.exe I used. It may be the make.exe from here, www.equation.com/.../equation.cmd.
  • In reply to cowens:

    Well that was easy. I could have thought of that myself. Unfortunately it made the problem worse. Performing a build without any modifications went from 1m:36ms to 1m:37s.889ms.
  • In reply to Joost:

    Are your project sources under NDA, such that you can't share them publicly?  It might help if someone (we forum folks, a coworker) could clone your project and try to reproduce your results on a different machine.

    Is there some small percentage of your project sources where, if you eliminated the rest, the build time is reduced linearly by that factor?  If you could bisect your source tree like that to find a subset of your project that blows up the build time, you could narrow down the cause.

    Another suggestion is downloading any toy e2Studio project, building it and noting the build time.  It should be roughly proportional to the ratio of source/header files in each project.

    Last suggestion is to figure out just how many makefiles e2Studio is generating and GNU make is reading, and how big they are. e2Studio creates a subdirectory named after the build config name (e.g. "HardwareDebug"), several subdirectories mirroring the project source tree, some toplevel makefiles called 'makefile' and 'makefile.init', and a 'subdir.mk' in each mirrored subdirectory.  You can find the list of all the makefiles GNU make reads by searching for 'include ' in the toplevel 'makefile' and in each of the include'd makefiles.

    $ grep '^[[:space:]]*-\{0,1\}include' HardwareDebug/makefile* | sed -e 's/^.*include \{1,\}//' | while read makefile; do cat "HardwareDebug/${makefile}"; done | wc -l
    cat: HardwareDebug/sources.mk: No such file or directory
    cat: 'HardwareDebug/$(C_DEPS)': No such file or directory
    cat: 'HardwareDebug/$(C_UPPER_DEPS)': No such file or directory
    cat: 'HardwareDebug/$(CPP_DEPS)': No such file or directory
    cat: 'HardwareDebug/$(CXX_DEPS)': No such file or directory
    cat: 'HardwareDebug/$(CC_DEPS)': No such file or directory
    cat: 'HardwareDebug/$(C++_DEPS)': No such file or directory
    cat: 'HardwareDebug/$(S_UPPER_DEPS)': No such file or directory
    cat: 'HardwareDebug/$(ASM_DEPS)': No such file or directory
    cat: 'HardwareDebug/$(SX_DEPS)': No such file or directory
    cat: 'HardwareDebug/$(JMP_DEPS)': No such file or directory
    cat: 'HardwareDebug/$(SRC_DEPS)': No such file or directory
    cat: 'HardwareDebug/$(PP_DEPS)': No such file or directory
    cat: 'HardwareDebug/$(P_DEPS)': No such file or directory
    cat: 'HardwareDebug/$(FSY_DEPS)': No such file or directory
    cat: HardwareDebug/../makefile.defs: No such file or directory
    cat: HardwareDebug/../makefile.targets: No such file or directory
    1242

    $ wc -l HardwareDebug/makefile
      248

    I have 1242 + 248 = 1590 lines in all my makefiles.  None of the *_DEPS variables seems to be set in any of my makefiles, so those include lines are no-ops.  How many makefiles does your project have, and how big are all of them?  How many source & header files do you have in your project?

  • In reply to AnthonyJenkins:

    How does e2Studio figure out the dependencies between source files and the header files they #include?  Traditionally the (GNU) preprocessor is run on each source file and it prints a (GNU) make rule that can be include'd by the makefile(s) that describes the dependency between 'foo.c' and all the 'bar.h' files it #includes.  I don't see any of that in my project...

  • In reply to AnthonyJenkins:

    Unforunately I'm not allowed to share my full project, but the stripped down version I shared shows the issue just fine on my setup. Again, compiling the code really doesn't take that long if not doing a full rebuild. It is the make process that takes up all of the time. Even if I press the Build button without modifying any code, the whole process takes about a minute.

    The output of the commands you suggested is 7306+61=7467 lines.

    I took some time to remove the Synergy stacks one by one to see what was causing the delay. It wasn't until I removed the GuiX stack that the build time was reduced to just 20 seconds (7 if I remove the pre-build step too). The number of lines in makefiles is now reduced to 3824+153=3977.