NativeScript - Angular production-ready?


#1

I was transferring an app from ionic2 because of performance issues with long list views, and indeed I could see big difference in speed and efficiency with NativeScript.

However… my overall testing (v 2.5.1) on Android (mobile + tablet) was a real disappointment. The user experience was laggy and far from feeling smooth or professional enough for commercial apps.

Do you have any compiling suggestions or an estimate when a production-ready NativeScript will be out?

Thanks.


#2

Could you post what versions of NS you were running (CLI, core modules, android platforms). Also if you have some code to share it’s possible you just need a nudge in the right direction to get what you’re looking for. There are many great performing angular nativescript apps on the play stores so it’s possible.

Would like to see where your app is struggling and see if anything obvious can be done to improve. Look forward to your response :smile:


#3

Thanks for your response Brad.

I’ve upgraded to the latest and using nativescript 2.5.2 tns-core-modules 2.5.1 tns-android 2.5.0, is seems somewhat better.

To further test it I’ve tried a new simple app, started from Grocaries template and just navigation to a page with side drawer, and back button. It works ok mostly, but sometimes it doesn’t, and this is strange. After navigating to the page and back home few times in a row, sometime 2-3 times and some other times 20+ times, it gets to the point where it just freezes for 1-2 secs.

Also, I’ve tested ‘Examples NativeScript’ app from the store on a device. It seems ok on iphone but the navigation from main page to other pages is really slow on Android and… sometimes exhibits the same ‘freeze’ effect. Just play with it, clicking the ‘conference agenda’ page and hitting ‘back’ several times and you might notice it. The navigation is slow enough to not feel like a native app, and this is a problem.

I like NativeScript, and also willing to wait for v3 on April, but need to know that these concerns are known and addressed.

Thanks again.


#4

@berchik There are some gleeches on ns+ng, and also some things that one should prevent.

First, about lists, there’s a performance issue for lists within GridViews. Try not to use a ListView but simple *ngFor interation within a scrollView to avoid it (or not to have it nested within gridView).

About your tests with the Examples nativescript, I think the version in the store is not up to date. Also, don’t forget that nativescript is running within the UI Thread, and if you have big calculation, you should use web workers.


#5

A couple performance tips when using Angular + {N} the app should use web pack , using a list view with *ngIf to switch between templates is a no post , if you plan on using remote images you should preload the data it would help or you can use the fresco/imagecacheit(picasso) plugin , if you plan on doing doing some data manipulation i would suggest offloading it to a worker


#6

True, if you are not in the case of this issue, using listView is better.


#7

Thanks for the ideas, I’ll test them, however since I’m not using ListView inside GridViews or managing big/small items or images, its probably not the issue here but something more fundamental with the platform. Hopefully we will continue to see improvements.