Hacker News new | ask | show | jobs
by KronisLV 2052 days ago
While Java GC on Android may not always be optimal in regards to memory utilization (given that there are other concerns) and AFAIK doesn't allow tuning like you can do for enterprise Java apps it seems like quite a few improvements have been made over time and many GC implementations have resulted from this: https://proandroiddev.com/collecting-the-garbage-a-brief-his...

Personally, i'd look at how common cross-platform apps are and how many of the frameworks (like Ionic and React Native) don't always use the native system UI in an efficient manner.

It seems a bit like running Electron apps on GNU/Linux and being puzzled about where all of the RAM goes.

1 comments

The Native UI in React Native is where Native comes from in the name. Nothing to do with an electron app which is a full fledged browser with a node process attached to it. Not a fair comparison by large
And yet, that is not the case! While ReactNative might not result in quite as big of a performance penalty as embedding a browser engine, its performance can still be worse than actual native apps, given that it adds additional abstractions to make developer's lives easier and allow for cross-platform development: https://medium.com/swlh/flutter-vs-react-native-vs-native-de...

While one could argue that there aren't that many visually driven experiences like that out in the wild, the benchmarks still prove that most abstractions have drawbacks.

Of course, there are good reasons for using them, which is also why many choose even the previously mentioned Electron platform for development, instead of something like Qt/GTK on desktop.

But for the discussion at hand, it simply serves as a suggestion that there's more at play here than just "Java uses a lot of memory and can be slow".