Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Improving Text Anti-aliasing and GUI Performance in IntelliJ IDEA on OpenJDK 8

This is a list of tweaks to make IntelliJ IDEA work better with OpenJDK 8. Refer to System Properties for Java 2D Technology for the details of the options used below.

Note that the performance boost achieved via the OpenGL-based hardware acceleration pipeline is made possible by using the open-source Radeon driver (for AMD graphics cards) included in the latest stable version (10.3.3 as of now) of the Mesa 3D Graphics Library available in the official Fedora 21 stable repository. Therefore, the gained performance boost might vary based on the types of graphics cards and the versions of the drivers used in your system.

  1. Fixing Text Anti-aliasing in Fedora (Ubuntu users may skip this step.)
  2. Fixing text anti-aliasing in IntelliJ IDEA

In $IDEA_HOME/bin/idea64.vmoptions (or $IDEA_HOME/bin/idea.vmoptions on a x86 architecture), change

-Dawt.useSystemAAFontSettings=lcd

to

-Dawt.useSystemAAFontSettings=on
  1. Improve Java 2D performance for IntelliJ IDEA by switching to OpenGL-based hardware acceleration pipeline

In $IDEA_HOME/bin/idea.properties, add the following:

##---------------------------------------------------------------------
## Enable the OpenGL-based pipeline, which provides hardware acceleration.
##---------------------------------------------------------------------
sun.java2d.opengl=true
  1. Done.

NOTE

If you would like these settings to be global for all Java applications (including IntelliJ IDEA) in your local system, export _JAVA_OPTIONS from your ~/.profile as follows:

export _JAVA_OPTIONS='-Dsun.java2d.opengl=true -Dawt.useSystemAAFontSettings=on'

By doing so, you don't have to make any change in any of the configuration files for IntelliJ IDEA.

@kiratheone
Copy link

kiratheone commented Sep 21, 2020

Thank you, now i can see ton of code with smoothly

@ember-rose
Copy link

ember-rose commented Mar 5, 2021

Thanks! Enabling the OpenGL backend fixed the scroll latency reported in IDEA-210991, even on the proprietary Nvidia drivers.

@aaaee2
Copy link

aaaee2 commented Apr 5, 2021

Thanks, enabling OpenGL gave a significant boost in rendering and removed the delay when switching tabs.
(Windows 10, 4k (3840x2160), Core i7 9700K, GeForce RTX 2080)

@dineshdharme
Copy link

dineshdharme commented May 27, 2021

Thanks for this tip. Have enabled both the options. Will monitor the performance difference.

@susomejias
Copy link

susomejias commented Aug 27, 2021

Thanks for this tip! ❤️

@loriopatrick
Copy link

loriopatrick commented Dec 2, 2021

I love you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment