[HN Gopher] Running IntelliJ Idea with JDK 17 for Better Render ...
       ___________________________________________________________________
        
       Running IntelliJ Idea with JDK 17 for Better Render Performance
       with Metal
        
       Author : CSDude
       Score  : 69 points
       Date   : 2021-12-24 18:26 UTC (4 hours ago)
        
 (HTM) web link (mustafaakin.dev)
 (TXT) w3m dump (mustafaakin.dev)
        
       | [deleted]
        
       | aPoCoMiLogin wrote:
       | If anyone is interested why this is even a thing, you can see
       | here [0] how every change in the IDE repaints whole window, thus
       | eats CPU like mad. On the MacOS with external 4k+ monitor, this
       | really tanks even macpro, like there is no GPU acceleration at
       | all and everything is rendered by the CPU.
       | 
       | [0] - https://photos.app.goo.gl/fsxgEHXCsTzKL37w7
        
       | ilovecaching wrote:
       | It amazes me that people put up with the gigabytes of RAM and
       | full cores it takes to use Jetbrains products when
       | VSCode/Vim/emacs can do 99% of what Jetbrains IDEs can do with
       | LSP at a fraction of the power consumed. I guess fleet is
       | Jetbrains acknowledging this shortcoming, but paying for current
       | products that are marginally better than free and open source
       | seems crazy to me.
        
         | kelp wrote:
         | The difference, at least with Vim and Emacs is the time it
         | takes or time one can spend getting it all setup to do all the
         | nice things the Jetbrains products just do out of the box.
         | 
         | I think the last time I fully revamped my Neovim setup I spent
         | upwards of 40 hours learning, tweaking, and plugin shopping.
         | And that was before Neovim shipped with it's own LSP so it was
         | CoC. Now I'd probably spend however many hours converting my
         | config over to the new setup.
         | 
         | The Jetbrains stuff just worked. I tweaked a small handful of
         | settings and was good to go.
         | 
         | I'm generally allergic to anything Java, and desktop apps
         | written in Java tend to scare me off. But I'm glad I got over
         | that bias, because I've been pretty happy with CLion.
        
           | paulryanrogers wrote:
           | CoC?
        
             | scns wrote:
             | https://github.com/neoclide/coc.nvim
        
         | lol768 wrote:
         | > VSCode/Vim/emacs can do 99% of what Jetbrains IDEs can do
         | with LSP at a fraction of the power consumed
         | 
         | I've never experienced a comparable editing, inspections and
         | refactoring experience with these LSP-based editors to what I
         | get from JetBrains' tooling. It's absolutely not 99% :)
        
           | gtaylor wrote:
           | The debugging and profiling features are excellent, too. Love
           | the thread visualizer on PyCharm.
        
         | gbear605 wrote:
         | I've tried VSCode, Sublime, Vim, Eclipse, and IntelliJ for both
         | Java and Python development. I'm more productive with IntelliJ
         | for both (though Python is only more productive if I'm also
         | extensively using type hints). Eclipse was the second best, but
         | it had enough rough spots and slowness than IntelliJ still
         | handily beat it out. The marginal productivity gain is probably
         | in the tens of hours throughout a year, which makes it more
         | than worthwhile for my company to pay the $99 for it.
         | 
         | I use Sublime for other coding where it's fewer files (and Vim
         | for quick text editing in consoles) and I'm quite happy with it
         | as long as I don't have to do any refactoring. VSCode is too
         | slow for me in comparison and I kept running into bugs with
         | extensions when I tried it a year ago or so.
        
         | pjmlp wrote:
         | Are you aware that VSCode support for Java is actually based on
         | running Eclipse headless?
         | 
         | Fleet does the same thing as well.
        
         | emeraldd wrote:
         | There are a few languages I won't touch without an IDE: Java
         | and C#. For Java I use IntelliJ and I don't write C# at all
         | anymore. Otherwise, I use Vim. VSCode is a complete non-starter
         | for me. I glanced at it a long while back and quickly concluded
         | it wasn't going to give me an editor experience I would enjoy.
         | In particular around "windows" to view files/sections of a
         | file. Something that IntelliJ also doesn't do a good job of,
         | but it does provide a huge advantage for Java code.
        
           | selimnairb wrote:
           | I think dynamic languages like Python also benefit from IDEs
           | since they can do continuous static analysis to help catch
           | errors.
           | 
           | Java is better with an IDE because it's so damn verbose, and
           | common frameworks like Spring entail a lot of "magic".
        
         | endless1234 wrote:
         | Writing code and what comes with it is the one potentially
         | resource intensive thing I do at work. It's not like I'd be
         | gaming at the same time. I don't really care if my programming
         | environment takes up a few gigabytes of my 16 or 32 gigs of
         | available memory. That's why I have it, no? Perhaps that "1%"
         | difference is something that makes my daily work a lot nicer?
        
         | W0lf wrote:
         | I'd argue that one should not compare editors to IDEs as they
         | are not comparable. I was using VIM professionally (i.e. at
         | work) for many years until CLion showed up. Sure enough I could
         | get around in VIM using many LLVM tools such as clang-rename,
         | clang-format, clang-analyzer etc. but an IDE is doing much more
         | (of rather is capable of) than editing text efficiently.
        
         | dijit wrote:
         | You've already had a lot of comments to the same effect...
         | 
         | But I certainly don't mind my developer tools taking more power
         | since that's _what I'm using my computer for_. When it comes to
         | things like Slack /Teams, where that is not the primary
         | function of my workstation (and, by it's nature needs to be
         | running on _everyones_ computer) I get more annoyed at wasted
         | resources.
         | 
         | Those are secondary functions of my computer.
         | 
         | Web browsing, instant messaging, email. These things should be
         | as lean as possible to get out of the way of my real work,
         | wether that's after effects or photoshop or visual studio (the
         | fat one).
        
           | zdragnar wrote:
           | > But I certainly don't mind my developer tools taking more
           | power since that's what I'm using my computer for
           | 
           | If you are okay with being chained to a power outlet, sure. I
           | often find myself needing to be on battery power, and
           | applications gulping electricity is frustrating at best.
           | 
           | (I don't use the visual design tools you listed regularly,
           | just writing / editing code and poking API endpoints, so
           | maybe that has much to do as well).
        
         | tomc1985 wrote:
         | "Marginally"?
         | 
         | It millions of man-hours of development to get VS Code even
         | remotely _near_ what JetBrains has been doing well for over a
         | decade, and that 's being very generous in judgement. How much
         | money was wasted trying to get Electron to not perform super
         | shitty?
         | 
         | Jetbrains software has its issues but it handles and has
         | handled nearly every language I throw it save dotnet. And I
         | grew up on big chunky IDEs and that is what I know and like.
         | Vim is cool (I use it for more basic tasks) but lobbing
         | molotovs like that only furthers pointless holy wars.
        
         | danieldk wrote:
         | Some language servers (e.g. PyRight) also regularly consume 2GB
         | RAM for me when using Emacs. Also, for some languages, their
         | IDEs are just way ahead of the competition (e.g. Java). Even
         | for e.g. Rust CLion works really well.
         | 
         | (I probably use Emacs and JetBrains products 50/50. I prefer
         | the keybindings of Doom Emacs, but prefer the JetBrains IDEs
         | for actual development. E.g. refactoring is a lot easier.)
        
           | kelp wrote:
           | I'd almost forgotten that a lot of the (n)vim language
           | servers require Node.js. The first time I tried CoC it was
           | over an ssh session to a small VPS I had.
           | 
           | I started up Neovim with the new config, and promptly had my
           | ssh session hang. It took me a little bit to figure out that
           | I'd maxed out the 256MB of RAM on my little VPS and hard
           | locked it. Had to get a bigger VPS to actually run my editor.
        
         | sgjohnson wrote:
         | >"gigabytes of RAM [...] it takes to use JetBrains" >VSCode
         | 
         | Not to mention that in this context it's not even appropriate
         | to use Vim an VSCode in the same sentence.
        
         | denimnerd42 wrote:
         | jetbrains works for me in a way those others do not. vim and
         | emacs are non starters. vscode is plugin hell. jetbrains just
         | works out of the box.
        
           | sethhochberg wrote:
           | Sometimes good enough defaults are really good enough.
           | 
           | There definitely was a time in my career (admittedly before
           | VSCode and some of the other cool new kids on the editor
           | block even existed) where I obsessed over vim plugins and
           | macros and themes - but these days I love that consistent out
           | of the box experience, too. Plus the IDEA has DataGrip
           | embedded, and I love having a good database client right
           | alongside the code I'm looking at.
           | 
           | As I've gotten older my whole philosophy with tech has
           | shifted towards not letting the perfect be the enemy of the
           | good, editors/IDEs included.
        
         | sk5t wrote:
         | They really aren't comparable; IDEA is far ahead in profiling,
         | refactoring, inspections, Git history integration, and probably
         | a bunch of other things too that I haven't yet bothered to
         | learn about.
        
       | jaytaylor wrote:
       | I wonder: Would the JDK17 GraalVM offer additional benefits?
        
         | kaba0 wrote:
         | Do you mean the Graal JIT compiler or AOT compiling? The former
         | may at times be better at escape analysis, but I don't think
         | there would be a significant difference. Using an up-to-date GC
         | implementation is already night-and-day (I use G1GC with
         | slightly decreased target pause time and larger heap size. But
         | ZGC would be probably the best for this use case)
         | 
         | I'm not sure whether Intellij could be AOT compiled, would be
         | interesting due to faster startup time but AOT compiled
         | binaries can be somewhat slower than what the JIT compiler is
         | capable of.
        
       | dijit wrote:
       | JDK17 also supports wayland natively, one of the major blockers
       | of having a good experience on wayland is waiting for the upgrade
       | to JDK17.
       | 
       | https://youtrack.jetbrains.com/issue/JBR-1315
        
         | kevinherron wrote:
         | You sure about that? The existence of this project suggests
         | otherwise:
         | https://wiki.openjdk.java.net/display/wakefield/OpenJDK+Proj...
         | 
         | AFAIK it's all still running on XWayland.
        
         | samus wrote:
         | JDK 17 does _not_ support Wayland natively. [Project Wakefield]
         | (https://wiki.openjdk.java.net/display/wakefield/OpenJDK+Proj..
         | .) aims to resolve that. So far, Java GUI applications only
         | support connecting to an XWayland server when on Wayland. This
         | is also stated in the bug you linked.
        
           | dijit wrote:
           | That's extremely unfortunate and I'm not sure how I got that
           | impression.
           | 
           | I'm quite certain I read this because I spent significant
           | amounts of time trying to get IntelliJ to run on EA versions
           | of JDK... but evidently I'm wrong as it even mentions as such
           | in the link I pasted.
           | 
           | :/
        
       | kelp wrote:
       | Dumb question here. Why is this necessary? Does Jetbrains not
       | include their latest Jetbrain Runtime release in their IDE
       | builds?
       | 
       | Or maybe Jetbrains Runtime releases run a bit ahead of what gets
       | bundled in with the various Jetbrains IDEs?
        
         | aPoCoMiLogin wrote:
         | Jetbrains includes JBR11 by default.
        
         | bmc7505 wrote:
         | It is recommended to use the currently bundled JBR version (JDK
         | 11). Although later versions are available for testing, they
         | are less stable as the author of this blog post mentions at the
         | end.
        
         | chrisseaton wrote:
         | JetBrains' fork is not regularly merged, and is somewhat old at
         | the moment.
        
       ___________________________________________________________________
       (page generated 2021-12-24 23:00 UTC)