microsoft / appcenter-cli

Command-line Interface (CLI) for Visual Studio App Center
https://appcenter.ms/
MIT License
582 stars 235 forks source link

[React Native]Can I improve speed when publish app ? My case it's take 30 sec to publish #709

Closed tanawat-code closed 5 months ago

tanawat-code commented 4 years ago

my spec

OS : Ubuntu cpu family : 6 model : 63 model name : Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz

Log

2019-11-13 15:54:35.573: INFO [68c85f3c-f810-436e-94af-1b177bab6bae] [Publish process] exe : cd /workspace/mobile-runtime/published && node node_modules/appcenter-cli/bin/appcenter.js codepush release-react -a xxxx/xxxxxx -d xxxxxx --disable-duplicate-release-error --token XXXXXXX 2019-11-13 15:54:39.161: Detecting android app version: 2019-11-13 15:54:39.161: 2019-11-13 15:54:39.182: Using the target binary version value "5.0.0" from "android/app/build.gradle". 2019-11-13 15:54:39.183: 2019-11-13 15:54:39.189: Running "react-native bundle" command: 2019-11-13 15:54:39.189: 2019-11-13 15:54:39.201: node node_modules/react-native/local-cli/cli.js bundle --assets-dest /tmp/code-push20191013-416-1hk59qh.metik/CodePush --bundle-output /tmp/code-push20191013-416-1hk59qh.metik/CodePush/index.android.bundle --dev false --entry-file index.js --platform android 2019-11-13 15:54:39.643: warn The following packages use deprecated "rnpm" config that will stop working from next release: 2019-11-13 15:54:39.643: - react-native-code-push: https://microsoft.github.io/code-push 2019-11-13 15:54:39.643: Please notify their maintainers about it. You can find more details at https://github.com/react-native-community/cli/blob/master/docs/configuration.md#migration-guide. 2019-11-13 15:54:49.250: Loading dependency graph, done. 2019-11-13 15:54:49.250: 2019-11-13 15:54:51.756: info Writing bundle output to:, /tmp/code-push20191013-416-1hk59qh.metik/CodePush/index.android.bundle 2019-11-13 15:54:51.775: info Done writing bundle output 2019-11-13 15:54:53.085: info Copying 30 asset files 2019-11-13 15:54:53.104: info Done copying assets 2019-11-13 15:54:53.212: 2019-11-13 15:54:53.212: Releasing update contents to CodePush: 2019-11-13 15:54:53.212: 2019-11-13 15:55:03.622: Successfully released an update containing the "/tmp/code-push20191013-416-1hk59qh.metik/CodePush" directory to the "xxxx/xxxxxx" deployment of the "xxxx/xxxxxx" app.

ahdbilal commented 4 years ago

@tanawat-code The speed depends a lot on the internet connection and the bundle size. Also, you might want to add the --debug flag with the release to see what's going on under the hood.

tanawat-code commented 4 years ago

log run with --debug

Thank you. You are right @ahdbilal It's take so much time when build bundle. Any suggestion to optimise this process. Note! This size is after I already take all image resource out of asset and replace by using url on cloud.

In short log

2019-12-03 13:28:47.078: Running "react-native bundle" command: 2019-12-03 13:28:47.078: 2019-12-03 13:28:47.087: node node_modules/react-native/local-cli/cli.js bundle --assets-dest /tmp/code-push2019113-73-1g78ah8.fxnh/CodePush --bundle-output /tmp/code-push2019113-73-1g78ah8.fxnh/CodePush/index.android.bundle --dev false --entry-file index.js --platform android 2019-12-03 13:28:47.775: warn The following packages use deprecated "rnpm" config that will stop working from next release: 2019-12-03 13:28:47.775: - react-native-code-push: https://microsoft.github.io/code-push 2019-12-03 13:28:47.775: Please notify their maintainers about it. You can find more details at https://github.com/react-native-community/cli/blob/master/docs/configuration.md#migration-guide. 2019-12-03 13:29:10.985: Loading dependency graph, done. 2019-12-03 13:30:04.563: info Writing bundle output to:, /tmp/code-push2019113-73-1g78ah8.fxnh/CodePush/index.android.bundle 2019-12-03 13:30:04.581: info Done writing bundle output 2019-12-03 13:30:05.937: info Copying 30 asset files 2019-12-03 13:30:05.958: info Done copying assets 2019-12-03 13:30:06.075: 2019-12-03 13:30:06.075: Releasing update contents to CodePush:

====================================================

Full log

2019-12-03 13:28:44.500: Using appcenter-cli version: 2.3.0 2019-12-03 13:28:44.516: logFilter, request: { 2019-12-03 13:28:44.516: "rawResponse": false, 2019-12-03 13:28:44.516: "queryString": {}, 2019-12-03 13:28:44.516: "url": "https://api.appcenter.ms/v0.1/apps/xxxxxxxx/xxxxx/deployments/dmard_Prod", 2019-12-03 13:28:44.516: "method": "GET", 2019-12-03 13:28:44.516: "headers": { 2019-12-03 13:28:44.516: "Content-Type": "application/json; charset=utf-8", 2019-12-03 13:28:44.516: "user-agent": "appcenterCli/2.3.0 NodeJS/v10.16.3 linux/4.4.0-31-generic", 2019-12-03 13:28:44.517: "x-api-token": "xxxxxxxx" 2019-12-03 13:28:44.517: }, 2019-12-03 13:28:44.517: "body": null 2019-12-03 13:28:44.517: } 2019-12-03 13:28:45.984: Response status code: 200 2019-12-03 13:28:45.984: Body: {"name":"dmard_Prod","key":"nz0nnV69WBPrpkhoaf7W1BmohZKC9siD2zVEy","latest_release":{"target_binary_range":"5.0.0","blob_url":"https://codepush.blob.core.windows.net/storagev2/Xq-79HOjooLh_5MZzn1PuNC8aXnxf6fb2441-5c64-4149-b13e-e8b838d9261f","is_disabled":false,"is_mandatory":false,"label":"v33","package_hash":"4ace606ee60241848e8ac57a6834cb80b2d530efb08a638bf03d0be6ff9aaebd","released_by":"bbnetsystem1@gmail.com","release_method":"Upload","rollout":100,"size":561789,"upload_time":1574048991848,"diff_package_map":{"d9b76cb8864ce5b81cc6905cc715bf1be5f004437a8e2d549b9d336ae26a87b0":{"size":484714,"url":"https://codepush.blob.core.windows.net/storagev2/RPpWpnRqIK87gTwHW8BB1d1zvYNNf6fb2441-5c64-4149-b13e-e8b838d9261f"},"d98045a9d97060e3c46dbbb64a05feaa1128a1f15b652fc1258d54009a19e87f":{"size":484714,"url":"https://codepush.blob.core.windows.net/storagev2/sKvu86MvLPWnq1AZsIgmFft8CXTVf6fb2441-5c64-4149-b13e-e8b838d9261f"},"7e70d820c6583df187102b9d2f951cad584e7adf9e76b1c15b0ea58bddccd5d0":{"size":484665,"url":"https://codepush.blob.core.windows.net/storagev2/_qNtbNfMahr6RilOIDKrrm3j6AXyf6fb2441-5c64-4149-b13e-e8b838d9261f"},"bf400862531a71b2a099b939eea9fb3dae5c95eed75ae641a9e01cc9cdf6d1eb":{"size":484665,"url":"https://codepush.blob.core.windows.net/storagev2/nZjbaY7mGINo5zpdcRc9XtN5RSFFf6fb2441-5c64-4149-b13e-e8b838d9261f"},"d47b754ebddb6ad7e309390adf6f19a95a6cf427b83b54ab5785f081dcb454a0":{"size":484714,"url":"https://codepush.blob.core.windows.net/storagev2/20fy5MVJB-MvzCsOgqr4JVI-hYzDf6fb2441-5c64-4149-b13e-e8b838d9261f"}}}} 2019-12-03 13:28:45.989: logFilter, request: { 2019-12-03 13:28:45.989: "rawResponse": false, 2019-12-03 13:28:45.989: "queryString": {}, 2019-12-03 13:28:45.989: "url": "https://api.appcenter.ms/v0.1/apps/xxxxxxxx/xxxxx", 2019-12-03 13:28:45.989: "method": "GET", 2019-12-03 13:28:45.989: "headers": { 2019-12-03 13:28:45.989: "Content-Type": "application/json; charset=utf-8", 2019-12-03 13:28:45.989: "user-agent": "appcenterCli/2.3.0 NodeJS/v10.16.3 linux/4.4.0-31-generic", 2019-12-03 13:28:45.989: "x-api-token": "xxxxxxxx" 2019-12-03 13:28:45.989: }, 2019-12-03 13:28:45.989: "body": null 2019-12-03 13:28:45.989: } 2019-12-03 13:28:47.054: Response status code: 200 2019-12-03 13:28:47.055: Body: {"id":"c70d0dd7-2dd1-4b5e-b5f0-74eded74428b","app_secret":"xxxxxxxx","description":null,"display_name":"xxxxx","name":"xxxxx","os":"Android","platform":"React-Native","origin":"appcenter","icon_url":null,"created_at":"2019-10-17T03:16:23.000Z","updated_at":"2019-10-17T03:16:23.000Z","release_type":null,"owner":{"id":"f5feed47-94b9-4d2d-a42e-6b4910be5f7c","avatar_url":null,"display_name":"xxxxxxxx","email":null,"name":"xxxxxxxx","type":"org"},"azure_subscription":null,"member_permissions":["manager"]} 2019-12-03 13:28:47.060: Detecting android app version: 2019-12-03 13:28:47.060: 2019-12-03 13:28:47.072: Using the target binary version value "5.0.0" from "android/app/build.gradle". 2019-12-03 13:28:47.072: 2019-12-03 13:28:47.078: Running "react-native bundle" command: 2019-12-03 13:28:47.078: 2019-12-03 13:28:47.087: node node_modules/react-native/local-cli/cli.js bundle --assets-dest /tmp/code-push2019113-73-1g78ah8.fxnh/CodePush --bundle-output /tmp/code-push2019113-73-1g78ah8.fxnh/CodePush/index.android.bundle --dev false --entry-file index.js --platform android 2019-12-03 13:28:47.775: warn The following packages use deprecated "rnpm" config that will stop working from next release: 2019-12-03 13:28:47.775: - react-native-code-push: https://microsoft.github.io/code-push 2019-12-03 13:28:47.775: Please notify their maintainers about it. You can find more details at https://github.com/react-native-community/cli/blob/master/docs/configuration.md#migration-guide. 2019-12-03 13:29:10.985: Loading dependency graph, done. 2019-12-03 13:30:04.563: info Writing bundle output to:, /tmp/code-push2019113-73-1g78ah8.fxnh/CodePush/index.android.bundle 2019-12-03 13:30:04.581: info Done writing bundle output 2019-12-03 13:30:05.937: info Copying 30 asset files 2019-12-03 13:30:05.958: info Done copying assets 2019-12-03 13:30:06.075: 2019-12-03 13:30:06.075: Releasing update contents to CodePush: 2019-12-03 13:30:06.075: 2019-12-03 13:30:06.246: logFilter, request: { 2019-12-03 13:30:06.247: "rawResponse": false, 2019-12-03 13:30:06.247: "queryString": {}, 2019-12-03 13:30:06.247: "url": "https://api.appcenter.ms/v0.1/apps/xxxxxxxx/xxxxx/deployments/dmard_Prod/uploads", 2019-12-03 13:30:06.247: "method": "POST", 2019-12-03 13:30:06.247: "headers": { 2019-12-03 13:30:06.247: "Content-Type": "application/json; charset=utf-8", 2019-12-03 13:30:06.247: "user-agent": "appcenterCli/2.3.0 NodeJS/v10.16.3 linux/4.4.0-31-generic", 2019-12-03 13:30:06.247: "x-api-token": "xxxxxxxx" 2019-12-03 13:30:06.247: }, 2019-12-03 13:30:06.247: "body": null 2019-12-03 13:30:06.247: } 2019-12-03 13:30:07.756: Response status code: 200 2019-12-03 13:30:07.756: Body: {"id":"8cf84615-336c-4f5d-a10b-36906e6ab76a","upload_domain":"https://file.appcenter.ms","token":"?sv=2018-03-28&sr=c&si=8cf84615-336c-4f5d-a10b-36906e6ab76a2019-12-3-06-12-29&sig=I0PHBFCxG%2Blq5lGWPlritdEazMGid1vk4k5rCs%2BX%2BLI%3D&se=2019-12-08T06%3A25%3A30Z&t=distribution"} 2019-12-03 13:30:12.438: logFilter, request: { 2019-12-03 13:30:12.438: "rawResponse": false, 2019-12-03 13:30:12.438: "queryString": {}, 2019-12-03 13:30:12.439: "url": "https://api.appcenter.ms/v0.1/apps/xxxxxxxx/xxxxx/deployments/dmard_Prod/releases", 2019-12-03 13:30:12.439: "method": "POST", 2019-12-03 13:30:12.439: "headers": { 2019-12-03 13:30:12.439: "Content-Type": "application/json; charset=utf-8", 2019-12-03 13:30:12.439: "user-agent": "appcenterCli/2.3.0 NodeJS/v10.16.3 linux/4.4.0-31-generic", 2019-12-03 13:30:12.439: "x-api-token": "xxxxxxxx" 2019-12-03 13:30:12.439: }, 2019-12-03 13:30:12.440: "body": "{\"release_upload\":{\"id\":\"8cf84615-336c-4f5d-a10b-36906e6ab76a\",\"upload_domain\":\"https://file.appcenter.ms\",\"token\":\"?sv=2018-03-28&sr=c&si=8cf84615-336c-4f5d-a10b-36906e6ab76a2019-12-3-06-12-29&sig=I0PHBFCxG%2Blq5lGWPlritdEazMGid1vk4k5rCs%2BX%2BLI%3D&se=2019-12-08T06%3A25%3A30Z&t=distribution\"},\"target_binary_version\":\"5.0.0\",\"disabled\":false,\"mandatory\":false,\"rollout\":100}" 2019-12-03 13:30:12.440: } 2019-12-03 13:30:15.684: Response status code: 201 2019-12-03 13:30:15.684: Body: {"target_binary_range":"5.0.0","blob_url":"https://codepush.blob.core.windows.net/storagev2/_3_jJshSSqjOCrnCGHhnTtPhMq7hf6fb2441-5c64-4149-b13e-e8b838d9261f","is_disabled":false,"is_mandatory":false,"label":"v34","package_hash":"ad6e10f2523919d1927cd6899416b822865a006ac4cafa8fbf20807bbd427dc2","released_by":"bbnetsystem1@gmail.com","release_method":"Upload","rollout":100,"size":588516,"upload_time":1575354036693} 2019-12-03 13:30:15.685: Successfully released an update containing the "/tmp/code-push2019113-73-1g78ah8.fxnh/CodePush" directory to the "dmard_Prod" deployment of the "xxxxx" app.

ahdbilal commented 4 years ago

We are working right now on a new version of CodePush that will address performance issues. I will share more details of it when the timeline is clear.

DmitriyKirakosyan commented 5 months ago

As we do not have plans to add support for this feature in the next year, I'm closing the issue.