5 ms·
Java on desktop in 2022 seems like a lost cause. It's always slow and hogs resources like crazy. A good example is all the Jetbrains IDE's. Try running any of t
by phplovesong 5y ago
Java on desktop in 2022 seems like a lost cause. It's always slow and hogs resources like crazy. A good example is all the Jetbrains IDE's. Try running any of them on a low powered laptop and you end up having a bad time.
Luckily there seems to be a push for fully native.
- gjvc 5y agochanging the garbage collector to G1GC and / or not using JDK11 as the boot java improves matters. JetBrains seems refuse to admit there is a problem. Hopefully things get better when they move to JDK17. But yes, for the past few years, the experience latency-wise is garbage.
- mahesh-hegde 5y agoIs slowness of intelliJ IDEs attributable to Java alone? Android studio feels more sluggish than vanilla IntelliJ. I had to write an app in JavaFX for a course project. Compared to most desktop apps written using electron, it was fine. But by default it looks like an old desktop app, for which you'd expect some more performance. It maybe still good for enterprise apps where you have some Java programmers. Also, startup time; It had some noticeable delay. I tried flutter recently; If you ignore that apps look like mobile apps, flutter desktop apps feel more responsive. As for paradigm, recent UI-in-code frameworks like flutter seem superior. In JavaFX you can write Widgets in code or in FXML, but java the language or APIs don't fit into that paradigm like Flutter does.
- kaba0 5y agoHow is that a relevant benchmark? It’s like claiming that c++ is “slow” because look at the memory consumption of this program calculating some big-ass weather model on a cluster of machines.. Intellij does a shit load of thing, caches your files, constantly monitors for changes, etc. It is not vim written in java.
- jowdones 5y agoLike everything, IntelliJ got increasingly bloated, at a faster rate than the progress in CPU performance. I've got a desktop machine from around 2010 with 32-bit OS, Core i5 760 (510 / 1611 point in geekbench single/multithreaded) and 4 Gb RAM, runs my current Java code in IntelliJ from those times at blazing speed. Modify a line of code and run in debug, it's up an running in less than a second. Same code on a 2018-ish laptop, 64-bit OS, 16 Gb RAM, i7 6700 HQ (798 / 3073 in geekbench) and latest IntelliJ takes up to 10 seconds to start. It's not "Java", it's bloat.
- jcelerier 5y agoC++ ides do cache files and monitor for changes too but they are much more useable on low-end hardware than anything Java.
- rusk 5y agoCitation and meaningful comparative ananlysis needed here. I would want to be certain you are not making a comparison with powerful text editors like Slickedit or Emacs - these are not the same. At the scale that something like IntelliJ or your favourite C++ based IDE operate at, Java is not the bottleneck. It’s all down to the system complexity involved in doing all that code crunching in near real time and the integration with various back ends and plugins that causes the lag. I have used many a native IDE in my time and they’ve all been pretty horrid, and to me Intellij is probably the best of them. At this scale of complexity I think the tightly structured and predictable environment provided by Java actual helps performance as it’s easier to maintain and design a cohesive scalable application.
- jcelerier 5y agoI'm mainly using Qt Creator, which has integrated on-the-fly code analysis with clangd for instance and I guess most of what you'd expect from a modern IDE, many refactorings, various unit test system integrations, SSH support... When trying CLion on the exact same projects everything is just so much slower with no major value-add, like, even opening UI menus feels sluggish. And let's not even talk about typing text, I feel like I'm fighting my keyboard whenever I try to use it. (My computer is an Intel 6900k with 64 GB of RAM to give a point of reference)
- kaba0 5y agoQtCreator does a tiny fraction of what Intellij is capable of though. Also, clion is not nearly as used as intellij, which is (only slightly arguably ) the best ide hands down for java and many other languages.
- jabbany 5y ago> Luckily there seems to be a push for fully native. Really? I thought there was a push for Electron/Chromium everywhere (which seems comparable or worse than desktop Java...)
- danuker 5y agoI think Electron is neither here nor there. It is the "stroad" of software distribution: the sluggishness and poor performance of a web interface, coupled with the difficulty to upgrade of a desktop package. Personally I push for either native apps or web apps, to regain at least one of the benefits lost by packaging web apps.
- ihateolives 5y ago> coupled with the difficulty to upgrade of a desktop package Huh? Two Electron apps that I use are Github Desktop and VSC. Neither is sluggish and both have streamlined automatic updates.
- danuker 5y ago> streamlined automatic updates Sure, from the user's perspective. But from the provider's perspective, there is a lot of infrastructure needed to reliably and automatically update on various platforms. Compiling files per-platform, hosting them securely, checking checksums, binary self-replacement, settings migration for many possible settings... Compare with deploying the server code, migration only for one data set (the one on the server), and then hitting refresh in a web browser.