We have been developing with NativeScript a couple of months now, and we came to the conclusion that NativeScript is 50% slower on Android than on iOS when it comes to launching, rendering views and switching between views.
Does anyone know why there is such a big difference between those two platforms? I only found out that for the purpose of NativeScript to work, the NativeScript runtime can only call towards native Android through the Java Native Interface, where as for iOS/Objective-C, the runtime can call native functions and objects directly.
Is there any more reason why there is such a difference in performance?
Thanks in advance.
CLI: 2.0
Android: 5.1
iOS: 9.3
+1
I mean, I also feel that, kinda laggy....
+1
totally agree with you !
P.S. on iOS,even HTML 5 based app is performing pretty well !
+1
agreed and frustrated
Hei all,
I'm deep into profiling NativeScript modules now and I've found few places which could be optimized (mainly in dependency-object and property). This will improve the overall performance of both platforms because most of our properties are dependency properties. On top of that we are moving all CPU intensive parts into native code so that they are executed on a background threads (like image decoding) which will also optimize UI responsiveness.
Still I will greatly appreciate if you could send me (here on in an email) projects that you observe the slowness of Android so that I can profile and eventually optimize it.
@jjTudu @c1ngular @Daxito @Metalmate Someone wants to help with a project?
@hshirstov I right now if I create a project it would be perfect, I just feel it sometimes with our existing app, sometimes here sometimes there......but if that is not expected then I can always check my side.... so, unable to provide project really :(
@Daxito Throw me anything you've got.
I just created a public repo on https://github.com/Metalmate/NativeScript-performance-sample, with sample code. The page generated with JS is still fast, but the pages with the list of items and buttons show quiete some delay.
Let's start it
Hey folks,
We recently uploaded latest version of our demos:
https://play.google.com/store/apps/details?id=org.nativescript.examples
We are using various techniques for better performance including bind/load on demand, async image loading with cache, V8 heap snapshot, etc.
Thanks
I changed from Ionic to NativeScript because of the no-webview-approach, what i like very much.
But i realized that Android with NativeScript is absolutely slow, while iOS works pretty well.
Does the NativeScript team already realize that there something needs to be done? I wrote one app as proof-of-concept with Ionic2-beta11 and the other one with NativeScript 2.3.0. On iOS both work very good, the NativeScript app is the winner - looks better and feels (of course) more native. But on Android the clear winner is Ionic2, which is much more responsive and quicker - even with the webview. Hopefully there will be some enhancements for the Android part of NativeScript soon.
@andreasotto Check out this ticket... https://github.com/NativeScript/NativeScript/issues/2735
As far as I know Nativescript has been fast on Android after being refactored in version 2.0 (?) but since 2.3 there is some garbage collection on navigation that is causing lag.
@andreasotto thank for the feedback! It should not be that way - definitely NativeScript android perf should be close to what you see on iOS !
Which areas of the app are perceived as slow? Can you share the app source code to see the problem. On what device you are testing?
Also can you try our demo app on android and let us know how it feels on the device - https://www.nativescript.org/nativescript-example-application
I will prepare my current app and share it for you to see the problem (probably by tomorrow).
HI @valentinstoychev , @andreasotto please let us know if there was any update to your very interesting approach :-)
It would be interesting to add existing doc from NativeScript about Android performances.
https://www.nativescript.org/blog/android-performance---the-why-and-the-how
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.