this post was submitted on 04 Aug 2023
473 points (100.0% liked)
Programmer Humor
854 readers
9 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Is there a reason Android studio is so fucking resource hungry? XCode is running way better with a simulator open and the other Jetbrain IDEs are just fine as well and so is any other virtualization. It’s just Android Studio that sucks somehow.
[This comment has been deleted by an automated system]
It's probably because it uses Java, which isn't known for its speed
AFAIK, JetBrains IDEs are also based on Java
Android Studio is a Jetbrains IDE itself!
the java VM itself is actually pretty damn fast, sometimes even faster than native code because it can optimize code paths while it's running
applications built with it tho, I'd say hit and miss but honestly we all know it's a miss most of the time
It has been shown to run faster in some benchmarks. This is usually due to hotspot optimizations performed at runtime by the VM, but also sometimes thanks to offloading the (often costly) deallocation of memory from the main thread. Since Java has a GC running in a background thread, the deallocation of memory occurs outside of the measured execution.
However, I remain convinced that while burst execution of a computation can perform on par with a language like C or Rust, the total resource usage of Java code is significantly worse. When taking into account the entire execution including GC and JIT compilation, it will have spent more memory and/or CPU cycles. It's harder to quantify, but the overall performance experienced by the user becomes worse. Fans run more and battery time is lower.
And yeah, I'd say Java libraries are generally more poorly written than e.g. their Rust counterparts, for example not paying attention to the CPU cache (which is hard and sometimes impossible since Java still lacks value classes).
Android Studio itself doesn't seem to be that resource hungry but the emulator on the other hand...
The emulator runs super well... If your host OS is Linux. If not, yeah, it's useless.
Xcode is also a pretty bad IDE feature-wise, it's hard to compare the two.
IntelliJ is not so bad resources-wise, but it's pretty RAM-hungry and so is the build process, that doesn't help.
I have had the exact opposite experience.