Closed vlast3k closed 8 years ago
Those many compiles are the library dependency detection. It's not compiling code, only analyzing it to discover which libraries you are using.
Unfortunately, the builder is not yet smart enough to detect when it has discovered all the info, so it needlessly repeats the detection process. Hopefully future versions will become smarter about minimizing the number of steps, and maybe even cache the results?
ahhh i understand, so this is prehaps due to the modified compilation after 1.6.5 ? indeed - it is faster than when compiling the first time, but on a bigger sketch (especially when compiling for ESP8266, where tehre is more space) it takes almost 30 seconds to discover that i have forgotten some semicolon :))
@PaulStoffregen Do you mean it needlessly repeats detection within one compilation? Or only between compilation? Adding some caching between compilations seems like a good idea indeed - it can probably use the existing .d files to invalidate the cached values when a file changes.
@matthijskooijman Why was this closed? It's worth doing if it makes the IDE faster and less resource heavy.
i have closed it as i noticed that for the ESP8266 on both 1.6.5 and 1.6.7 the linker behaves the same way. For AVR projects on 1.6.5 the results seemed to be reused better indeed, but my pain point is the esp8266 as the sketches are much bigger there.
@Avamander Agreed, but since this is something arduino-builder should fix, I've created a new issue here: https://github.com/arduino/arduino-builder/issues/127
with arduino 1.6.5, compiling a pre-built sketch was almost instantaneous. Now with 1.6.7 each time all files are recompiled and the previous results are not reused. Or maybe not all but it takes much more time
Attaching a verbose output of the compilation which was triggred exactly after a previous compile