Enabling parallel build in Eclipse to speed up compilation

Development environment specific, Arduino, Eclipse, VS2013,Em::Blocks etc
Post Reply
victor_pv
Posts: 1747
Joined: Mon Apr 27, 2015 12:12 pm

Enabling parallel build in Eclipse to speed up compilation

Post by victor_pv » Sun Jul 02, 2017 9:41 pm

Today I was wondering why when I compile it's so slow and doesn't use either much of my CPU or Disk throughput.
A search in Google took me to this page, showing how to enable parallel builds in Eclipse (including the Arduino plugin/Sloeber):
http://infocenter.arm.com/help/index.js ... 15608.html

I did a test enabling it to the "optimal" job number (in my case 8, which matches the number of threads in this CPU).

With the setting disabled, compiling Marlin:

Code: Select all

16:35:46 Build Finished (took 2m:37s.812ms)
With that setting enabled and set to 8:

Code: Select all

16:37:38 Build Finished (took 18s.996ms)
I ran it several times to confirms it had nothing to do with the files being cached or something like it.

User avatar
Pito
Posts: 1628
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Enabling parallel build in Eclipse to speed up compilation

Post by Pito » Mon Jul 03, 2017 7:47 am

I've tried it (use 4 parallel jobs here, 2 cores, 4 threads) and the speed up is close to 2x.. (clean->build) 8-)

@Victor: any idea how to speed up the indexing at the start of the Sloeber? With 30+ projects it takes a minute, all 4 threads full load..
Last edited by Pito on Mon Jul 03, 2017 9:01 am, edited 1 time in total.
Pukao Hats Cleaning Services Ltd.

danieleff
Posts: 336
Joined: Thu Sep 01, 2016 8:52 pm
Location: Hungary
Contact:

Re: Enabling parallel build in Eclipse to speed up compilation

Post by danieleff » Mon Jul 03, 2017 7:56 am

Close the unused projects ;)

User avatar
Pito
Posts: 1628
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Enabling parallel build in Eclipse to speed up compilation

Post by Pito » Mon Jul 03, 2017 8:54 am

+1 :)
It still takes 8 seconds with 2 small projects out of 37 :)
Pukao Hats Cleaning Services Ltd.

Post Reply