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

Optimize package installation #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dwb357
Copy link

@dwb357 dwb357 commented Apr 1, 2019

Optimize package installation by tracking which packages have been installed (during this run) and not attempting to reinstall them. Quick way around the current n log n process.

@mfuchs
Copy link
Contributor

mfuchs commented Apr 3, 2019

Thank you for the PR. :)

What does your gradle command look like so that the same packages are installed multiple times?

@dwb357
Copy link
Author

dwb357 commented Apr 3, 2019 via email

Copy link
Contributor

@mfuchs mfuchs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again thanks for the PR.
Please squash together the first and third commit, that makes the history easier to understand.

@@ -170,6 +172,13 @@ class EmulatorsPluginExtension {
this.defaultEmulator
}

Installer getInstaller() {
if(installer == null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a space after the if.

packages = packages.grep { !installed.contains(it) }

// If there's no work left, exit early
if(packages.empty) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a space there as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants