Open full view…

Eclipse Photon (4.8.0, Build: 20180619-1200) RTist C++ Builds Can Be Very Slow

Wed, 24 Jul 2019 00:24:59 GMT

I have a project that has an enormous number of includes due to external libraries used by the project such that the length of the compile command reaches around 30K characters. When I build it, there is a huge difference in the build times depending on how the build is done: 1. Eclipse Photon RTist C++ project build: 106.5 seconds 2. Eclipse Photon C++ project (copied above to a new directory without .cproject or .project and import as C++ project into eclipse) build: 8.7 seconds 3. Command line make build of #1 above: 7.5 seconds Other projects that have shorter compile commands build as an Eclipse RTist C++ project nearly as fast as at the command line. Why is this? And how does one resolve the slow build times in #1 above? It is like there is some kind of resource constraint when built as an RTist C++ project in Eclipse.

Pritesh Patel
Tue, 06 Aug 2019 22:34:14 GMT

Hello again. I have taken note of the performance delays when you are building a project that has a large (30k) compile command. We will replicate and see what is causing the delays in RTist. Thanks again for providing the issue to us.

Wed, 07 Aug 2019 02:33:06 GMT

With a little investigation I found a work around that may point to the root cause. All of the discussion below references the generated project "C/C++ Build" properties accessed by right clicking on the generated project, selecting "Properties", then selecting "C/C++ Build". By default on the "Tool Chain Editor" dialog, the "Current builder" is set to "" which exhibits the slow compiles when the compile command is long as described above. A work around is to uncheck "Display compatible toolchains only" and set the "Current toolchain" to "No ToolChain". (The toolchain specified in will be used if a complete path is provided in the "CC =" and "AR_CMD = " variables.) Once this is done, on the C/C++ Build/Behavior tab set "Enable parallel build" with "Use optimal jobs". These two changes will result in fast compiles like at the command-line or when the compile line is fairly short.

Wed, 07 Aug 2019 16:41:50 GMT

Before building after making the above changes, be sure and "Clean Project".