NativeScript-App: different performance - AppBuilder vs. NativeScript-CLI

4 posts, 0 answers
  1. Mobiledev1
    Mobiledev1 avatar
    6 posts
    Member since:
    Mar 2015

    Posted 17 Feb Link to this post

    Hi,

     I've noticed some differences in the app-performance on Android when the NativeScript-app is built in the cloud with Telerik AppBuilder) and when it is built locally with the NativeScript command-line-interface.

     I created a Mailbox-App with NativeScript, that consists of a TabView containing the lists for inbox and outbox. I have built the apk-package in both ways, with Telerik AppBuilder and with the NativeScript CLI. The performance-differences appear when you are scrolling the ListViews and when you are swiping slowly between inbox and outbox within the TabView.
    The scrolling and swiping in the app created by NativeScript-CLI is smoother than in the app created by Telerik AppBuilder, but it is always the same JavaScript- and XML-codebase.

     I tested this scenario on serveral devices:
    -   Moto X Play (Android 5.1.1)
    -   Galaxy Tab 4 (Android 4.4.2) ...

    and it is always the same result.
     

     When I build the app with the NativeScript-CLI, I use the following specifications:
    -   NativeScript CLI version 1.5.2 and tns-core-modules 1.5.2
    -   Android SDK Tools 24.4.1
    -   Platform Tools 23.1
    -   Build Tools 23.0.2

    See the folIowing link to access the apk-packages (one created by AppBuilder and the other one with NativeScript-CLI) and the projects.

    https://drive.google.com/folderview?id=0B5bzHSHv-whWVjduLXVwNGQwRkk&usp=sharing

    Please tell me if you are able to reproduce this behaviour. Providing two ways for building NativeScript-Apps is a good idea, but they should lead to the same result.

    Best regards,
    Felix

  2. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 21 Feb Link to this post

    Hi,

    Thank you very much for the detailed report of the issue and the provided sample applications and .apk files.
    I've investigated the case and I can confirm there are some performance differences. However AppBuilder's build process is exactly the same as NativeScript CLI's one. The only difference between the two project's is the AndroidManifest.xml file. In AppBuilder there's a different AndroidManifest.xml that is populated based on the settings in the UI. So I've compared the result manifests from your projects and I've noticed that in your AppBuilder's project the following value:
    android:hardwareAccelerated="false"

    I believe this is causing the performance differences. In order to enable Hardware Acceleration just select Properties in your AppBuilder project, click on Android and you'll see a toggle button. Set it to "on" and try the application on your device.

    Can you try this and see if this fixes the performance on your side?

    Regards,
    Rosen Vladimirov
    Telerik
     

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

     
  3. Mobiledev1
    Mobiledev1 avatar
    6 posts
    Member since:
    Mar 2015

    Posted 22 Feb in reply to Rosen Vladimirov Link to this post

    Hi,

    thank you very much! After turning on the hardware acceleration, the results are the same. I had not realized this option in the settings, maybe it would be better to turn this on by default.

     

    Regards,
    Felix
  4. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 22 Feb Link to this post

    Hello Felix,

    I'm glad the issue is resolved. 
    We agree with you that the option should be turned on by default for NativeScript projects and we'll change it for one of our next releases.

    Thank you for the great detailed report of the problem and the suggestion for improvement.

    Feel free to contact us in case you have any other problems or concerns.

    Regards,
    Rosen Vladimirov
    Telerik
     

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

     
Back to Top