Skip to content

LiveSync (too many redeploys for a single code change) #5740

@albertobastos

Description

@albertobastos

Looks like livesync has introduced some issues after 4.0 upgrade. When changes are detected, it seems that the "behind the curtain" work done by both the TypeScript compiler and the TNS Runtime mark as changed additional files also detected by the livesync, so a tiny change in the code ends up launching several deploys one after another.

I tested it with a just-created app using the nativescript-template-ng-tutorial, and adding a single Label to the main screen forced up to three re-deploys. In a bigger app such as the one I'm working on, changing a single comma now gets more than 90 seconds to be effectively deployed at the emulator :(

Scenario:

SO: Windows
Platform: Android
CLI version: 4.0.0
tns-code-modules version: 4.0.0
Runtime version (tns-android): 4.0.1

How to recreate it:

  • Create a starter app using the nativescript-template-ng-tutorial template.
  • Ensure the modules are updated with "tns update"
  • Launch livesync at emulator with "tns run android"
  • Save a minor change (for instance, adding a Label or a Button to app.component.ts) and watch the console output.

Console output:

Project successfully prepared (Android)
08:12:33 - File change detected. Starting incremental compilation...
Successfully transferred app.component.ts.
Refreshing application...
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: ANGULAR BOOTSTRAP DONE. 16608
Successfully synced application org.nativescript.pruebans4 on device emulator-5554.
Skipping prepare.
ActivityManager: Start proc 3759:org.nativescript.pruebans4/u0a164 for activity org.nativescript.pruebans4/com.tns.NativeScriptActivity
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: ANGULAR BOOTSTRAP DONE. 1433
Successfully transferred app.component.js.
Refreshing application...
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: ANGULAR BOOTSTRAP DONE. 2926
Successfully synced application org.nativescript.pruebans4 on device emulator-5554.
ActivityManager: Start proc 3854:org.nativescript.pruebans4/u0a164 for activity org.nativescript.pruebans4/com.tns.NativeScriptActivity
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: ANGULAR BOOTSTRAP DONE. 1527

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions