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

Initial LiveSync is extremly slow if the project has thousands of files #921

Closed
Fatme opened this issue Sep 15, 2015 · 4 comments
Closed
Assignees
Milestone

Comments

@Fatme
Copy link
Contributor

Fatme commented Sep 15, 2015

tns livesync --watch always syncs all files on first execution.

We've considered some ideas for optimizations:

  • Create and upload archive instead to execute adb push for each file.
  • Compute file hashes and upload only the changed files.

Here is the repo project https://github.com/NativeScript/sample-ng-todomvc

@Fatme Fatme added this to the 1.4.0 (Under review) milestone Sep 15, 2015
@Fatme
Copy link
Contributor Author

Fatme commented Sep 16, 2015

related to this #913

@Fatme Fatme modified the milestones: 1.5.0 (under consideration), 1.4.0 Sep 30, 2015
@rosen-vladimirov rosen-vladimirov modified the milestones: 1.5.1, 1.5.0 Nov 23, 2015
@Fatme Fatme modified the milestones: 1.5.1, 1.6.0 (Under consideration) Nov 23, 2015
@atanasovg
Copy link
Contributor

Let's see whether the problem is present when files are bundled with WebPack

Fatme pushed a commit that referenced this issue Jan 22, 2016
Fatme pushed a commit that referenced this issue Jan 22, 2016
rosen-vladimirov pushed a commit that referenced this issue Feb 4, 2016
rosen-vladimirov pushed a commit that referenced this issue Feb 4, 2016
rosen-vladimirov pushed a commit that referenced this issue Feb 5, 2016
Optimize the usage of `tns livesync android` command. In case your project is huge, every time you use it, the full project will be transferred to device.
Persist all file hashes of project's files and next time when command is executed transfer only the changed ones.
The json which contains hashes information should be on device, so when the device is attached to another PC, where the same project is developed, we'll still transfer only the changed files.
Related:  #921
@rosen-vladimirov
Copy link
Contributor

okay, we've found the way to speed the process for Android. In case your project is huge, every time you use tns livesync android (or the initial part of tns livesync android --watch, the full project will be transferred to device).
Persist all file hashes of project's files and next time when command is executed transfer only the changed ones.
The json which contains hashes information should be on device, so when the device is attached to another PC, where the same project is developed, we'll still transfer only the changed files.

@rosen-vladimirov
Copy link
Contributor

In order to test this - create project with thousands of files, execute tns livesync android --justlaunch.
Now change 1 file and execute it again - compare the times, second time should be really fast.

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

No branches or pull requests

7 participants