Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DO NOT MERGE: testing arduino-builder with multi core support #4240

Closed
wants to merge 1 commit into from
Closed

DO NOT MERGE: testing arduino-builder with multi core support #4240

wants to merge 1 commit into from

Conversation

ffissore
Copy link
Contributor

@ffissore ffissore commented Dec 2, 2015

This build (the one @ArduinoBot will kindly provide) contains a version of arduino-builder which will leverage all your PC cores to speed up compilation. Rough measurements show a speed improvement of 30%, but your mileage may vary

Please post your 👍 if you find it works as expected

@ffissore ffissore added feature request A request to make an enhancement (not a bug fix) Component: Compilation Related to compilation of Arduino sketches labels Dec 2, 2015
@ffissore ffissore self-assigned this Dec 2, 2015
@NicoHood
Copy link
Contributor

NicoHood commented Dec 2, 2015

Have you triggered the bot or is it just busy?

@NicoHood
Copy link
Contributor

NicoHood commented Dec 2, 2015

I compiled it myself. It seems to work and speed up the process. All 8 cores are used. (Elementary > Ubuntu LTS 64 bit). Only did a quick test, will keep the PR merged for the next weeks.

Now I am looking forward to make this usable with raspi2. This would be an ultimate combination of the two boards. Also Processing is now supported on the pi where you can combine the Arduino even better with the pi. Serial, gpios or whatever. But thats another issue/feature ;)

@ffissore
Copy link
Contributor Author

ffissore commented Dec 3, 2015

Thank for the test @NicoHood I'm looking forward for some windows and mac users

@PaoloP74
Copy link
Contributor

PaoloP74 commented Dec 3, 2015

Windows 7 64bit - Intel core i5 with SSD
Sketch Blink
Latest Hourly build (3 Dec - 9:59) 7.0 sec.
This build (PR 4240) 4.8 sec.
Second compilation 2.8 sec both.

@NicoHood
Copy link
Contributor

NicoHood commented Dec 3, 2015

The build does not seem to mark compile errors properly. Just hit into errors witht his (leonardo):

uint8_t array[2048];

void setup()
{
  Serial.begin(115200);
  memset(0xFF, array, sizeof(array); //here is the error
}

void loop()
{
  for (size_t i = 0; i < sizeof(array); i++)
  {
    Serial.println(array[i], HEX);
  }
}

@ffissore
Copy link
Contributor Author

ffissore commented Dec 3, 2015

Indeed. A previous version was eating errors printed on stderr. Please download the latest build and retry

@NicoHood
Copy link
Contributor

NicoHood commented Dec 3, 2015

Works now. It seems you used a commit --amend and forced a push. Please do not do that next time ;)

@matthijskooijman
Copy link
Collaborator

Works now. It seems you used a commit --amend and forced a push. Please do not do that next time ;)

I do that with pullrequests all the time, as far as I'm concerned, it's up to people pulling PR branches to be careful while pulling.

@MauroMombelli
Copy link

used time + command line forcing arduino uno as board to get better result

nightly:
arduino --verify ./examples/01.Basics/Blink/Blink.ino --board arduino:avr:uno 5.98s user 0.34s system 222% cpu 2.847 total

PR-4240:
arduino --verify ./examples/01.Basics/Blink/Blink.ino --board arduino:avr:uno 6.17s user 0.25s system 227% cpu 2.823 total

@ffissore
Copy link
Contributor Author

ffissore commented Dec 4, 2015

@NicoHood indeed I often rebase and force push on my dev branches, in order to keep the history nice and clean
@MauroMombelli it looks like this PR has worsen the situation. However you used the "arduino" command, which starts the whole IDE, adding much noise to your measurement. Plus, FYI, this PR makes a sensible difference only when compiling for the first time: on the second run, most of the needed files (especially those from core and from libraries) will be already compiled and thus skipped.
Anyway, the fact that you were able to compile is a good feedback. Thank you

@PaoloP74
Copy link
Contributor

PaoloP74 commented Dec 4, 2015

Sketch ASCIITable
Nightly 7.4 sec
Multi-core 3.9 sec

@MauroMombelli
Copy link

@ffissore compiled a bigger sketch, it take about 6 seconds to compile (and because arduino command take ~6 seconds, any noticeable gain should cover the noise), the situation is not worse because running many time the build command (deleting the /tmp/build* folder, but the arduino --verify does not seems to leave it anyway) give a variatio of about +-1 seconds.

A script can be made to measure to collect many run and see if there is a meaningful difference between the two script. Still better than using "feeling", also difference can be caused by different load on the system

target is atmega2560, code is BCN3D_v3_0_2x01 (download: https://github.com/BCN3D/BCN3D-Firmware/tree/master/BCN3D%2B/BCN3D_v3_0_2x01)

nightly:
Global variables use 4,810 bytes (58%) of dynamic memory, leaving 3,382 bytes for local variables. Maximum is 8,192 bytes.
arduino --verify ~/Arduino/BCN3D_v3_0_2x01/BCN3D_v3_0_2x01.ino 12.67s user 0.70s system 117% cpu 11.333 total

PR4240:
Global variables use 4,810 bytes (58%) of dynamic memory, leaving 3,382 bytes for local variables. Maximum is 8,192 bytes.
arduino --verify ~/Arduino/BCN3D_v3_0_2x01/BCN3D_v3_0_2x01.ino 12.67s user 0.67s system 118% cpu 11.267 total

@NicoHood NicoHood mentioned this pull request Dec 5, 2015
@ffissore ffissore added this to the Release 1.6.8 milestone Dec 10, 2015
@andig
Copy link

andig commented Jun 10, 2016

Is there any progress? Milestone is 1.6.8 but apparently it's not merged? Would love to speed up the build using the esp8266 core/libs. What is missing?

@cmaglie cmaglie modified the milestone: Release 1.6.8 Jan 19, 2017
@facchinm
Copy link
Member

Available in 1.9.0 Beta builds, closing this one

@facchinm facchinm closed this Nov 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Compilation Related to compilation of Arduino sketches feature request A request to make an enhancement (not a bug fix)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants