4 ms·
Google made a huge mistake choosing to base Android on Java, IMHO. I know they did it because they felt it would be easier to get developers on board but it's
by jcoffland 10y ago
Google made a huge mistake choosing to base Android on Java, IMHO. I know they did it because they felt it would be easier to get developers on board but it's the main reason Android is slow and memory hungry. OSes like Plasma prove that compiling binaries for ARM processors is not a big problem and that compiled code runs much faster. Java byte code may have the potential to run close to native speed but in practice it carries with it a lot of bloat.
- biafra 10y agoApparently you have no idea how Android works. There is no Java byte code running on Android devices. It doesn't even reach the device. Google just used the Java language and APIs. But never it's byte code or VM.
- danudey 10y agoThe code is written in Java, but a technical note: it's actually compiled to bytecode for the Dalvik runtime (and later, the Android runtime). Your points are still relevant, don't get me wrong, but the system isn't running Java bytecode specifically.
- pjmlp 10y agoAnd of course Android Rutime does AOT compilation to native code and with Android 7 a tiered compilation Assembly/JIT/AOT with PGO.
- pjmlp 10y agoYou obviously aren't aware that since Android 5 there isn't any bytecode being interpreted. Android is 100% native code since that version. Even the changes in Android 7, although they use an intepreter written in Assembly, the code is JITed with profile information, both are cached and it gets ultimately fully compiled to native code when the device is charging. Also in case you didn't notice, Apple is pushing for LLVM bitcode for their newer OS versions. There is even a BOF on this weeek's LLVM meeting about how to make LLVM IR fully hardware neutral.
- OOPMan 10y agoUnfortunately, despite all this Android is still a turd of an OS. Just about every Android device I've used has been painful in some way or other and invariably I've ended up rooting it and installing a custom firmware, generally the most light-weight one I can find. Unfortunately, despite these antics Android remains annoyingly prone to sluggishness, freezing, reboots and various other random problems. Ultimately it seems that with Android you're either forced to use a stock ROM which imposes a heavy memory footprint due to all the "wonderful" tweaks Samsung/Sony/HTC/Xiaomi have made or drop down to a user-built AOSP-based variant that is inevitably plague by its own issues. I'm horrified to think this kind of thing is the height of the mobile user experience.
- pjmlp 10y agoThose problems don't lie necessarily with the language, rather on the quality of work of everyone involved. I have seen pretty sluggish, full of memory leaks and dangling pointers, C code written at enterprise level, by developers that couldn't care 1s about code quality.
- Grishnakh 10y agoThat's weird; Android works pretty well for me these days. I have lots of problems with sluggishness, freezing, rebooting, etc. on my old HTC phone which had Gingerbread (I think), an ancient version of Android. But on my Galaxy S4 and my current Galaxy S5 (which is updated to 6.0.1 I think), things work quite well. It's not perfect of course: I'm using the regular Samsung/Sprint ROM which is absolutely loaded with crapware. I disabled all the crapware, but it's still there wasting a lot of valuable space out of my 16GB. It could be a little faster at times, like with the camera. But freezing and reboots just aren't a problem the way there were on old Android versions that I've used. I do plan on trying out CyanogenMod sometime when I have some free time. But for now, the carrier-pushed version seems to work decently well. I don't have any giant complaints.