Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nativescript 6 is very slow

Our application was developed with nativescript 4. The change of rules at the level of the Android Store has forced us to go under nativescript 6. Since our application is very slow. For example the password entry sometimes freezes, there is latency when selecting in a menu. Has anyone meet the same issues and has a solution to improve the responsiveness of the application?

ps: we already use the following compile options: - env.aot --env.snapshot --env.uglify --production

thank you in advance

like image 690
Alexis Avatar asked Sep 19 '19 09:09

Alexis


People also ask

Is NativeScript fast?

NativeScript apps are usually slower because the framework employs a single-threaded approach to access native device APIs.

Does NativeScript work on Web?

Use one Angular + NativeScript codebase to build native iOS, Android and web apps and learn NativeScript from scratch.

What is TNS in NativeScript?

Description. Runs your project on all connected devices or in native emulators for the selected platform. The command will work with all currently running Android devices and emulators. The command will prepare, build and deploy the app when necessary.

What is JavaScript NativeScript?

NativeScript is an open source framework for creating native iOS and Android apps in Angular, TypeScript, or JavaScript. It was developed by Progress Telerik. NativeScript allows you to build web and mobile apps from a single code-base.


1 Answers

If you are using 6.1, adding the "markingMode: none" option to your project will probably speed the things up. The performance degradation is caused by changes in the V8 Garbage Collection routine. The markingMode: none option eliminates the overhead that NativeScript adds on top of the V8 algorithm and in fact it should be faster than what you used to experience in {N} 4.0.

Fore more information on how to enable this option, checkout this article: https://docs.nativescript.org/core-concepts/android-runtime/advanced-topics/marking-mode-none#updating-an-app-or-a-plugin-to-support-markingmode-none

More context on the matter can be found in the NativeScript Blog

like image 167
anthares Avatar answered Sep 29 '22 17:09

anthares