- On a large file, or in a slow project, put the Inspection Level down a notch. (You can get to it from the Actions keyboard shortcut.) You can nudge it back up, including for whatever big file -- when needed.
- Install the plug-in "Automatic Power Saver," which does that automatically upon loss of focus. (Well, maybe down two notches?) I do notice the switch/transition sometimes but it makes my overall session so much smoother (mainly because browser and IDE aren't being slower than their combined slowness)
p.s. I've been dealing with JetBrains IDEs' slowness for 5+ years, have done the same workarounds you mentioned etc. I always have another fast editor set up, lately VS Code. For quick edits etc. I had a coworker who would use their JetBrains IDE only for the last stretch of their branch or ticket -- to get the inspections and other tools. I supposed I picked this up from them.
Two things to change to (likely) boost your JVM+IntelliJ performance:
1. Use the new ZGC garbage collector.
-XX:+UnlockExperimentalVMOptions -XX:+UseZGC
2. If you're using ZGC, it is fucking imperative you do not use compressed pointers. It will totally hose your system and you'll see unbelievable RAM thrashing (800mb to 16gb and back again within a few hundred milliseconds in one smallish project I have [and thats on a 5950x]). That is to say, after enabling ZGC, ensure you do NOT have the following configuration line:
-XX:+UseCompressedOops
I've been using ZGC for a few days and I have to say it's been fucking great. Before I'd get really long hangs due to GC; or eventually the editor would grind to a halt (after like 8 hours of usage). I've had the editor open for at least 48 hours now and it's just as fast as it was when I originally opened it.
Then there are the possible uses of G1 and Shenandoah.
This just in the context of OpenJDK, other implementations have their own JIT, AOT and GC variations to choose from.
So running on latest versions of a JDK already helps.
Me personally, I am happier using Eclipse and Netbeans anyway.
You can still get JRE, but they aren't as official as they used to be until Java 8.
And in any case, customization flags for which GC to use, or JIT caches, are part of any Java runtime implementation.