Hacker News new | ask | show | jobs
by hardwaresofton 2514 days ago
Nativescript has supported the web worker paradigm for multi-threading for a while now[0]. Also, I'd like to point that for a lot of applications (especially the ones that are basically informational without much interaction or client-side work, this actually isn't an issue early in the development process.

I've used Nativescript on client projects, and it is fantastic for prototyping, with well demarcated paths to performance optimization. Since you can easily use native screens/controllers/etc with it, at the very least you can use it for fast prototyping then drop all your custom code in.

Do you know of any hybrid frameworks that are not running JS code on the main thread by default? And by JS code I assume you mean display-related code, because Flutter suffers from this same issue, do too much hard work on the main thread and it stalls (as anything would). Even on android itself[1] you need to do some extra work to make sure your UI-related heavy lifting happens off the main thread:

> However, when the main thread’s messaging queue contains tasks that are either too numerous or too long for the main thread to complete the update fast enough, the app should move this work to a worker thread

[0]: https://docs.nativescript.org/core-concepts/multithreading-m...

[1]: https://developer.android.com/topic/performance/threads