telerik / mobile-cli-lib

Contains common infrastructure for CLIs - mainly AppBuilder, NativeScript, DDB and Proton.
Apache License 2.0
11 stars 10 forks source link

Fix EMFILE error when running on Android #1036

Closed rosen-vladimirov closed 6 years ago

rosen-vladimirov commented 6 years ago

During running on Android, CLI tries to take smart decision which files to upload. This is done by checking the shasum of all project files and comparing it with the latest one uploaded to device. However, in huge projects, this leads to error with code EMFILE as the OS have limits for opened file handles. This happens as CLI executes the operation simultaneously for all files. In order to fix this behavior, execute the actions by chunks (currently set to 100). Introduce new method in helpers to execute this action and add tests for it.

Fixes https://github.com/NativeScript/nativescript-angular/issues/1079 and https://github.com/NativeScript/nativescript-cli/issues/3268