arduino-cli icon indicating copy to clipboard operation
arduino-cli copied to clipboard

Skip archive (.a) creation if the archive is already up-to-date

Open cmaglie opened this issue 3 years ago • 0 comments
trafficstars

Please check if the PR fulfills these requirements

  • [x] The PR has no duplicates (please search among the Pull Requests before creating one)
  • [x] The PR follows our contributing guidelines
  • [ ] Tests for the changes have been added (for bug fixes / features)
  • [ ] Docs have been added / updated (for bug fixes / features)
  • [ ] UPGRADING.md has been updated with a migration guide (for breaking changes)

What kind of change does this PR introduce? Archive (.a) creation is skipped if the archive is already up-to-date. We should see a visible speed improvement when re-building libraries with a lot of files.

With this patch:

~/Arduino/IoTTest$ time arduino-cli compile -b arduino:mbed_nano:nanorp2040connect 
real	0m4,006s
user	0m3,279s
sys	0m1,197s

Without the patch:

~/Arduino/IoTTest$ time arduino-cli compile -b arduino:mbed_nano:nanorp2040connect 
real	0m12,303s
user	0m5,453s
sys	0m7,315s

What is the current behavior? The archive is always regenerated even if none of the object files in it are changed.

What is the new behavior? The archive is not regenerated if none of the object files archived is changed.

Does this PR introduce a breaking change, and is titled accordingly? No

cmaglie avatar Jun 20 '22 09:06 cmaglie