-
-
Notifications
You must be signed in to change notification settings - Fork 398
Reuse archiveCompiledFiles helper for long commandline shrink #2464
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
Reuse archiveCompiledFiles helper for long commandline shrink #2464
Conversation
Great patch, it's the second code optimization that you found! 👍🏼 BTW there is still a test failing, I'm looking into that. https://github.com/arduino/arduino-cli/actions/runs/7209431432/job/19640374148?pr=2464#step:6:2717 |
434978c
to
4410dc1
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2464 +/- ##
==========================================
+ Coverage 67.60% 67.65% +0.05%
==========================================
Files 207 207
Lines 20710 20706 -4
==========================================
+ Hits 14000 14008 +8
+ Misses 5565 5557 -8
+ Partials 1145 1141 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚗 💨 🚀
Since archiveCompiledFiles already handles hot cache correctly, this avoids objs.a being rebuilt even if files don't change. Would be ideal if PathList could expose a generic Filter API (to get rid of the "duplicated" filter)
It doesn't make sense anymore to keep path and filename separated.
a44fb6d
to
373e871
Compare
* Reuse archiveCompiledFiles helper for long commandline shrink Since archiveCompiledFiles already handles hot cache correctly, this avoids objs.a being rebuilt even if files don't change. Would be ideal if PathList could expose a generic Filter API (to get rid of the "duplicated" filter) * Upgrade go-paths / remove duplicate filter function * Consider existing archives during the build * Simplified archiveCompiledFiles function signature It doesn't make sense anymore to keep path and filename separated. * Added integration test --------- Co-authored-by: Cristian Maglie <[email protected]>
Since archiveCompiledFiles already handles hot cache correctly, this avoids objs.a being rebuilt even if files don't change.
Would be ideal if PathList could expose a generic Filter API (to get rid of the "duplicated" filter) @cmaglie
Please check if the PR fulfills these requirements
See how to contribute
before creating one)
our contributing guidelines
UPGRADING.md
has been updated with a migration guide (for breaking changes)configuration.schema.json
updated if new parameters are added.What kind of change does this PR introduce?
Reusing code is always a good idea, particularly if this fixes a missed optimization (the code path for long commandlines was always rebuilding
objs.a
even if the cache was hot)What is the current behavior?
objs.a
are always recreated in "long commandline" sketchesWhat is the new behavior?
Cached
objs.a
are reused, quite significant speedup for ArduinoIotCloud sketchesDoes this PR introduce a breaking change, and is titled accordingly?
Other information