Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 47 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save finalfantasia/cb8041996f540a158f18 to your computer and use it in GitHub Desktop.
Save finalfantasia/cb8041996f540a158f18 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.

@kiratheone
Copy link

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

@ember-rose
Copy link

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

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

@susomejias
Copy link

Thanks for this tip! ❤️

@loriopatrick
Copy link

I love you.

@RafaAguilar
Copy link

I could give you a hug!

Btw, for Mac users arriving to this post the file to add the OpenGL is located at:

~/Applications/PyCharm/Contents/bin/idea.properties

@nask0
Copy link

nask0 commented May 10, 2023

Linux users can find configuration settings for all IntelliJ products here: $HOME/.config/JetBrains/<IDE-NAME>, e.g.: $HOME/.config/JetBrains/PhpStorm2023.1/

@neldeles
Copy link

Thank you! This issue was driving me crazy and this fixed it. Am on an M1 MBP running Pycharm 2023.2.1 FWIW.

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