News for hackers. Stuff that matters.
Re:The decline and fall of Java on the desktop by phplovesong on Thursday March 03, 2022 @02:56AM (#30538321)
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.

Re:The decline and fall of Java on the desktop by kaba0 on Thursday March 03, 2022 @03:04AM (#30538381)
How 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.

Re:The decline and fall of Java on the desktop by jowdones on Thursday March 03, 2022 @04:09AM (#30538846)
Like 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.

Re:The decline and fall of Java on the desktop by jcelerier on Thursday March 03, 2022 @03:33AM (#30538595)
C++ ides do cache files and monitor for changes too but they are much more useable on low-end hardware than anything Java.
Re:The decline and fall of Java on the desktop by rusk on Thursday March 03, 2022 @04:00AM (#30538770)
Citation 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.

Re:The decline and fall of Java on the desktop by jcelerier on Thursday March 03, 2022 @04:18AM (#30538909)
I'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)

Re:The decline and fall of Java on the desktop by kaba0 on Thursday March 03, 2022 @05:51AM (#30539448)
QtCreator 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.
Re:The decline and fall of Java on the desktop by jabbany on Thursday March 03, 2022 @03:12AM (#30538458)
> 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...)

Re:The decline and fall of Java on the desktop by danuker on Thursday March 03, 2022 @03:57AM (#30538753)
I 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.

Re:The decline and fall of Java on the desktop by ihateolives on Thursday March 03, 2022 @04:14AM (#30538876)
> 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.

Re:The decline and fall of Java on the desktop by danuker on Thursday March 03, 2022 @10:34AM (#30542317)
> 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.

Re:The decline and fall of Java on the desktop by mahesh-hegde on Thursday March 03, 2022 @04:32AM (#30538980)
Is 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.

Re:The decline and fall of Java on the desktop by gjvc on Thursday March 03, 2022 @03:49AM (#30538702)
changing 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.