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

Startup is extremely slow on Android #371

Closed
brianchirls opened this issue Mar 24, 2015 · 14 comments
Closed

Startup is extremely slow on Android #371

brianchirls opened this issue Mar 24, 2015 · 14 comments

Comments

@brianchirls
Copy link

brianchirls commented Mar 24, 2015

The Hello World application often takes a very, very long time to show any interface and run the loaded callback. The last time I ran it on the emulator (X86 emulator with HAX installed), it took 37 seconds from the time the app showed up with a blank white screen and menu bar. I've seen it take long enough to get a "not responding" warning. It's also slow running on my actual device (Nexus 4).

I don't have this problem with other Android apps I built in pure Java with Android Studio. Start-up of Hello World on the iOS emulator is instantaneous.

@rosen-vladimirov
Copy link
Contributor

Hi @brianchirls
Thank you for your feedback. In fact speeding up android apps is our top priority for version 1.0. Currently the apps are starting slow on Android 5.*
One more thing - the speed up of emulator with HAX is possible when only a single emulator is running. In case you have running emulator and you start a second one, the performance will be as the default ARM images.

@cime
Copy link

cime commented May 25, 2015

I tried it today with the latest version of NativeScript on Nexus 4 (Android 5.1) and startup time is still slow (about 5-6 seconds until TAP button is shown)

$ tns --version
1.0.1

@bfattori
Copy link

Just tried this in 1.1.1 and my "app" (a XML page, no code beyond the basic app.js) takes 13 seconds to start. This is really pretty unacceptable. No one waits for a web page beyond 3 seconds, and they sure as hell don't want to wait 13 seconds for a "native" app to start. This needs to be improved.

@teobugslayer
Copy link
Contributor

Hello @bfattori,

indeed, 13 seconds are abnormally high. Can you tell us what device are you using for your test and which OS version it runs?

@bfattori
Copy link

I'm sorry, I jumped the gun. That was on the emulator. On device it is a
very acceptable 3-4 seconds.

You can reclose the issue.
On Jun 23, 2015 5:25 AM, "Todor Totev" notifications@github.com wrote:

Hello @bfattori https://github.com/bfattori,

indeed, 13 seconds are abnormally high. Can you tell us what device are
you using for your test and which OS version it runs?


Reply to this email directly or view it on GitHub
#371 (comment)
.

@CleverCoder
Copy link

I dunno... running the "Groceries" 'angular-start' code, with very, very basic code takes 5-6 seconds on my Nexus 6 device. This is pretty bad. I may re-open this or log a new issue if it continues this way. I don't even know where to begin profiling, since it's Nativescript.

@dtopuzov dtopuzov removed the 3 - Done label May 26, 2016
@robertonic
Copy link

robertonic commented Jun 24, 2016

The app I'm currently writing takes at least 7 seconds before anything is shown on a Nexus 7. This is too slow. N.B. This isn't a release build and I'm not sure if that would be faster.

I'm using Nativescript 2 + Angular + Typescript.

@kazemihabib
Copy link

I have the same problem
I'm using Nativescript 2 + Angular + Typescript.

@robertonic
Copy link

robertonic commented Jul 1, 2016

Is startup time for Android going to be improved in future releases? Currently I think it's so slow that NativeScript is close to unusable on Android. Can this issue be re-opened?

@robertonic
Copy link

Just rebuilt my app using Nativescript but not using Angular 2. Startup is now much faster and acceptable. (~3 seconds). The slow factor seems to have been Angular 2.

@dstamenkovic
Copy link

Same issue here, without Angular app startup is much faster. Tested on Android 6.

@tomcatmwi
Copy link

tomcatmwi commented Dec 3, 2017

How do you guys get a refresh in 5-6 seconds? It's 5-6 minutes for me, but a fresh build sometimes takes 20-25 minutes with a blank new app. It doesn't matter if it's Angular or not. It's a Samsung J1 with Android 6.0.1.

@matiasratcliffe
Copy link

matiasratcliffe commented May 9, 2018

As for May 09/2018, nativescript 4.0.0, I run the javascript template, and it takes 5 seconds tops to run. However, when I go for the angular template, and even after I enableProdMode(), I get no less than 24 seconds every time, on my moto c plus, android 7.0;
Here is my package.json:

{
"description": "NativeScript Application",
"license": "SEE LICENSE IN ",
"readme": "NativeScript Application",
"repository": "",
"nativescript": {
"id": "org.nativescript.testang",
"tns-android": {
"version": "4.0.1"
}
},
"dependencies": {
"@ angular/animations": "~5.2.0",
"@ angular/common": "~5.2.0",
"@ angular/compiler": "~5.2.0",
"@ angular/core": "~5.2.0",
"@ angular/forms": "~5.2.0",
"@ angular/http": "~5.2.0",
"@ angular/platform-browser": "~5.2.0",
"@ angular/platform-browser-dynamic": "~5.2.0",
"@ angular/router": "~5.2.0",
"nativescript-angular": "~5.3.0",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.8",
"rxjs": "~5.5.2",
"tns-core-modules": "~4.0.0",
"zone.js": "~0.8.2"
},
"devDependencies": {
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"lazy": "1.0.11",
"nativescript-dev-typescript": "~0.7.0",
"typescript": "~2.7.2"
}
}
Note that there are no spaces after the 'at' symbol in my real file, this was the only way I could escape githubs account reference mechanism

@dtopuzov
Copy link
Contributor

dtopuzov commented Jun 7, 2018

Hi @matiasratcliffe

Can you please try with NativeScript 4.1 and Angular 6, it contains a lot of performance improvements, specially in case you optimize your app with webpack.

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