-
Notifications
You must be signed in to change notification settings - Fork 8
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
base: master
Are you sure you want to change the base?
Conversation
… installation isn't an n log n problem. 2. Use a single Installer to facilitate Catrobat#1.
Thank you for the PR. :) What does your gradle command look like so that the same packages are installed multiple times? |
Not so much the command as that I have multiple emulators defined and the way the code is set up it installs:
* emulator1 image
* emulator1 image
* emulator2 image
* emulator1 image
* emulator2 image
* emulator3 image
etc. each new emulator causes every prior emulator image to also be reinstalled. There are more correct ways to fix it, but this also catches the case where you have multiple emulators that use the same image (ie., a phone and tablet, both on 23)
David W. Berry
[email protected]
… On Apr 3, 2019, at 14:25, Matthias Fuchs ***@***.***> wrote:
Thank you for the PR. :)
What does your gradle command look like so that the same packages are installed multiple times?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
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.
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) { |
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.
Please add a space after the if.
packages = packages.grep { !installed.contains(it) } | ||
|
||
// If there's no work left, exit early | ||
if(packages.empty) { |
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.
Please add a space there as well.
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.