Skip to content

Instantly share code, notes, and snippets.

  • Save kiratheone/579595ace9a7241381110335ef3382da to your computer and use it in GitHub Desktop.
Save kiratheone/579595ace9a7241381110335ef3382da to your computer and use it in GitHub Desktop.
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.

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