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

Optimization: skip Init() when no library or platform was installed #1663

Merged
merged 3 commits into from
May 12, 2022

Conversation

alranel
Copy link
Member

@alranel alranel commented Feb 14, 2022

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • 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?

This PR introduces an optimization that results in a speed up with no behavior changes.

  • What is the current behavior?

When installing a library or a platform, Init() is always called regardless of whether something was actually installed.

  • What is the new behavior?

When installing a library or a platform that is already installed, the call to Init() will be skipped. This results in a time saving and can really make the difference when doing a bulk install of multiple libraries, since Init() is slow.

No breaking change.

@per1234 per1234 added topic: code Related to content of the project itself type: enhancement Proposed improvement labels Feb 14, 2022
@per1234 per1234 assigned cmaglie and unassigned silvanocerza May 11, 2022
@alranel
Copy link
Member Author

alranel commented May 11, 2022

@per1234 I updated this and it's mergeable again. Can we merge it?

@cmaglie cmaglie merged commit afdc20c into arduino:master May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants