-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
feat(Android): optimize app installation. #3195
Conversation
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.
Hey hey,
this is going in a good direction but requires more work, still. We will run over this through several iterations.
Besides my comments, please be sure to also provide details regarding the positive impact this has over the overall execution time. I urge you to utilize the timeline artifact in order to be able to do that...
🙏🏻
detox/src/devices/common/drivers/android/tools/AppInstallHelper.js
Outdated
Show resolved
Hide resolved
detox/src/devices/common/drivers/android/tools/AppInstallHelper.js
Outdated
Show resolved
Hide resolved
detox/src/devices/common/drivers/android/tools/CryptoUtils.test.js
Outdated
Show resolved
Hide resolved
detox/src/devices/common/drivers/android/tools/AppInstallHelper.js
Outdated
Show resolved
Hide resolved
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.
Good progress but it's still not ready for merge. Please see my notes, especially the one regarding the external API changes.
detox/src/devices/common/drivers/android/tools/AppInstallHelper.test.js
Outdated
Show resolved
Hide resolved
detox/src/devices/common/drivers/android/tools/FileXfer.test.js
Outdated
Show resolved
Hide resolved
detox/src/devices/common/drivers/android/tools/HashFileXfer.test.js
Outdated
Show resolved
Hide resolved
detox/src/devices/common/drivers/android/tools/HashHelper.test.js
Outdated
Show resolved
Hide resolved
detox/src/devices/common/drivers/android/tools/HashHelper.test.js
Outdated
Show resolved
Hide resolved
7168e33
to
0285e55
Compare
# Conflicts: # detox/src/Detox.js # detox/src/Detox.test.js # docs/APIRef.DetoxCLI.md
Starting a review. |
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.
Good game 🥇
@@ -28,6 +28,7 @@ describe("Test", () => { | |||
|
|||
beforeAll(async () => { | |||
await device.reloadReactNative(); | |||
await device.resetAppState(); |
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.
why here? @noomorph / @jonathanmos
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.
@asafkorem it is not a test per se, it is a typing/compiler error check thing.
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.
Great job! Merge once CI passes 🎖️
} | ||
|
||
async readFile(deviceId, filepath, silent = false) { | ||
if (silent) { |
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.
This never seems to be called with silent=false
. Is this really necessary?
@jonathanmos
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.
It's to allow for calling nonsilently in future. Atm it's called only from the optimized flow
This reverts commit 9221257.
This reverts commit 1054887.
Description
Resolves #3175
Resolves #2537
Implemented only for Android.
resetAppState
to decide between clearing user data and reinstallation.behavior
config,optimizeAppInstall
with a corresponding CLI flag:--optimize-app-install
.In terms of performance: uninstall/install takes 6-7s, whereas clearing app state takes 400-600ms.
This pull request fixes #2534 .