|
|
|
|
|
by yoz-y
3184 days ago
|
|
Sure. The current problem on iOS is that you can not replace the web-rendering engine, thus you have to send messages or call callbacks into the web engine api. You have no guarantees as to when they will be actually executed and you have to serialize your data. In my application I needed to display data incoming from a sensor. I can only access this data using the native functions and it comes at around 500Hz from 16 sensors. For comparison, in Electron, when you call a function defined in a module written in C++, you can get the answer in under 1 ms. When using something like Cordova, you have to serialize the data which can take a seriously long time and then you have to wait for the callback to execute. On Android I suppose it is quite possible to write a V8 native plugin and achieve this performance, but not on iOS where you are limited to included webkit. As for the Android responsiveness, the problem lies with the single threaded nature of JavaScript. CPUs on android phones _suck_ in single core performance. When I was looking for a good solution for multi platform development, I have found of a tech meeting that was supposed to present solutions taken by several different companies. It turned to be a huge complaint-fest about Android javascript performance and the only happy people were those using Xamarin (which is native). Edit: Note that I think that using web views for applications like banking or chat and so on is perfectly fine. My issue is with apps that eat a lot of incoming data and/or have to change what is displayed very often. |
|
Perhaps systems that automatically build out to iOS have not been updated to use these features, or there is something else going on in Cordova to introduce latency? Because for at least 2 years now there is no reason to have the problem you describe.