Felipe
Felipe

Reputation: 11989

Nativescript navigation is terribly slow

I have implemented angular route navigation in nativescript, and I am experiencing poor performance, which I cannot seem to find a bottleneck for.

This is the current setup

┌──────────────────┬─────────────────┬────────────────┬───────────────┐
│ Component        │ Current version │ Latest version │ Information   │
│ nativescript     │ 2.3.0           │ 2.3.0          │ Up to date    │
│ tns-core-modules │ 2.3.0           │ 2.3.0          │ Up to date    │
│ tns-android      │ 2.3.0           │ 2.3.0          │ Up to date    │
│ tns-ios          │                 │ 2.3.0          │ Not installed │
└──────────────────┴─────────────────┴────────────────┴───────────────┘

The repository can be seen here: https://github.com/felipemullen/teras

You can see it's a very simple structure that is based on the example repository. However, a transition from one page to another takes about ~3-4 seconds, which is really bad.

Here are a couple screenshots to show how simple the app is, there is barely any binding, and no data is being loaded. All that happens is one button leads to another page:

enter image description here enter image description here

So the question is, why do these pages load so slowly? Is this simply because nativescript is still so young? I played with the demo apps, and they don't seem to have this issue.

Upvotes: 2

Views: 3116

Answers (2)

Alexander Vakrilov
Alexander Vakrilov

Reputation: 1131

The slow navigation is due to this issue:

https://github.com/NativeScript/NativeScript/issues/2735

It is already fixed in the "@next" builds and will be included in the official 2.4.0 release after 1-2 weeks.

Upvotes: 5

Bronco Oostermeyer
Bronco Oostermeyer

Reputation: 580

There seem to be some issues with 2.3.0, I switched to "tns-core-modules": "next" in package.json () which seems to make it a bit better but there is certainly work to be done in this area.

Upvotes: 1

Related Questions