{"action":"created","issue":{"url":"https://api.github.com/repos/meteor/meteor/issues/5297","labels_url":"https://api.github.com/repos/meteor/meteor/issues/5297/labels{/name}","comments_url":"https://api.github.com/repos/meteor/meteor/issues/5297/comments","events_url":"https://api.github.com/repos/meteor/meteor/issues/5297/events","html_url":"https://github.com/meteor/meteor/issues/5297","id":108508172,"number":5297,"title":"[Crosswalk] Initial hot-code push","user":{"login":"dnish","id":7636313,"avatar_url":"https://avatars.githubusercontent.com/u/7636313?v=3","gravatar_id":"","url":"https://api.github.com/users/dnish","html_url":"https://github.com/dnish","followers_url":"https://api.github.com/users/dnish/followers","following_url":"https://api.github.com/users/dnish/following{/other_user}","gists_url":"https://api.github.com/users/dnish/gists{/gist_id}","starred_url":"https://api.github.com/users/dnish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnish/subscriptions","organizations_url":"https://api.github.com/users/dnish/orgs","repos_url":"https://api.github.com/users/dnish/repos","events_url":"https://api.github.com/users/dnish/events{/privacy}","received_events_url":"https://api.github.com/users/dnish/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/meteor/meteor/labels/Project:Mobile","name":"Project:Mobile","color":"5319e7"},{"url":"https://api.github.com/repos/meteor/meteor/labels/ready-for-review","name":"ready-for-review","color":"e6e6e6"}],"state":"open","locked":false,"assignee":{"login":"martijnwalraven","id":54485,"avatar_url":"https://avatars.githubusercontent.com/u/54485?v=3","gravatar_id":"","url":"https://api.github.com/users/martijnwalraven","html_url":"https://github.com/martijnwalraven","followers_url":"https://api.github.com/users/martijnwalraven/followers","following_url":"https://api.github.com/users/martijnwalraven/following{/other_user}","gists_url":"https://api.github.com/users/martijnwalraven/gists{/gist_id}","starred_url":"https://api.github.com/users/martijnwalraven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martijnwalraven/subscriptions","organizations_url":"https://api.github.com/users/martijnwalraven/orgs","repos_url":"https://api.github.com/users/martijnwalraven/repos","events_url":"https://api.github.com/users/martijnwalraven/events{/privacy}","received_events_url":"https://api.github.com/users/martijnwalraven/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-09-27T02:06:55Z","updated_at":"2015-10-23T14:33:10Z","closed_at":null,"body":"When using the Crosswalk plugin for Cordova, it seems that Meteor runs an initial hot-code push after first start of the app. This issue doesn't happen when I use Cordova without Crosswalk. \r\n\r\nThink it's bad for the user experience when the app tries to reload all the data on first startup.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/meteor/meteor/issues/comments/150591353","html_url":"https://github.com/meteor/meteor/issues/5297#issuecomment-150591353","issue_url":"https://api.github.com/repos/meteor/meteor/issues/5297","id":150591353,"user":{"login":"Wenape","id":4762147,"avatar_url":"https://avatars.githubusercontent.com/u/4762147?v=3","gravatar_id":"","url":"https://api.github.com/users/Wenape","html_url":"https://github.com/Wenape","followers_url":"https://api.github.com/users/Wenape/followers","following_url":"https://api.github.com/users/Wenape/following{/other_user}","gists_url":"https://api.github.com/users/Wenape/gists{/gist_id}","starred_url":"https://api.github.com/users/Wenape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wenape/subscriptions","organizations_url":"https://api.github.com/users/Wenape/orgs","repos_url":"https://api.github.com/users/Wenape/repos","events_url":"https://api.github.com/users/Wenape/events{/privacy}","received_events_url":"https://api.github.com/users/Wenape/received_events","type":"User","site_admin":false},"created_at":"2015-10-23T14:33:10Z","updated_at":"2015-10-23T14:33:10Z","body":"Depending on the device, a hot code push will add a couple of extra seconds to the startup of your app. This is caused by all the downloads of the new update. If you are using `mdg:reload-on-resume`, you will save the user from a reload, but not from the extra secs that the all file downloads cause.\r\n\r\nI'm using an edited version of the autoupdate packge that allows file downloads from an update just when the app is in the background. When the user resumes the app, the files should be already downloaded and he will get an instant reload. If the files are not completely downloaded by the time the user resumes the app, a native loader (via plugin) is displayed until after everything is downloaded and the app is reloaded.\r\n\r\nThe thing I don't like about this approach though is it that a user could be using the app without ever putting it in the background, but just closing it. The actual approach at least ensures that the user will get the new version of the app when it is opened a on second opportunity. That's why I'm pushing important updates to the play / app stores and small / less important updates are hot code pushed.\r\n\r\nI think the ideal situation would be to download updates on startup, but using a background thread or a slower download of files to prevent a disturbance on the UX side of the app. If this is not possible, maybe control downloads via a session variable, so they could be executed later at a time when the app is not doing too much work (which is like what I'm doing now). This is just about downloading files thought. For the reload, probably a good approach is to continue doing it on reload or just ask the user to accept the update (and reload)."}}