Skufler
Skufler

Reputation: 307

IntelliJ IDEA Ultimate is extremly slow on mac M1

I'm using Mac Air M1 and trying to run IntelliJ Ultimate.

I've read some issues on JetBrains YouTrack and it seems that a lot of people are pretty satisfied with their experience. So, I think something is wrong with my environment and I can't find out what

Steps I've done:

  1. Rebooted my Mac

  2. Invalidated Caches & Restarted IDE

  3. Reinstalled IntelliJ

  4. Deleted "Caches" and "Application Support/JetBrains" directories and then reinstalled IDE

  5. Checked if I'm using a default Java Runtime version

  6. Checked if I'm using Intel version of IDE

  7. Disabled Antialiasing

  8. Closed "heavy" apps like Google Chrome

  9. Installed Atom Material Icons plugin

  10. Downloaded prebuilt shared indexes

  11. Modified .vmoptions and added

-Dsun.java2d.opengl=true
-Dsun.java2d.opengl.fbobject=false
  1. Disabled Smooth scrolling

  2. I'm not using external display, mac is connected to power outlet

Here is my environment:

IntelliJ:

IntelliJ IDEA 2022.1 (Ultimate Edition)
Build #IU-221.5080.210, built on April 12, 2022
Runtime version: 11.0.14.1+1-b2043.25 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.1
GC: G1 Young Generation, G1 Old Generation
Memory: 1024M
Cores: 8
Non-Bundled Plugins:
    com.mallowigi (64.0.0)
    Dart (221.5588)
    io.flutter (66.0.4)

Kotlin: 221-1.6.20-release-285-IJ5080.210

Mac:

Model Name: MacBook Air
Chip: Apple M1
Total Number of Cores: 8 (4 performance and 4 efficiency)
Memory: 8 GB
OS: macOS Monterey Version 12.1

Related YouTrack topics

UPDATE #1: Moved issue to JetBrains YouTrack: https://youtrack.jetbrains.com/issue/IDEA-293523/IntelliJ-IDEA-Ultimate-is-extremly-slow-on-mac-M1

Upvotes: 6

Views: 23796

Answers (7)

Vespucci75fr
Vespucci75fr

Reputation: 398

My building time were very slow compared to my colleagues.

After some investigation I realised I was using a java that was optimised for Intel.

You can easily find out by looking at the Kind column in Activity Monitor

(If you don't see java running just start a build from intellji)

enter image description here

I realised that you need a java build for aarch64

Just go to you project settings and download a java version with aarch64 as shown below.

enter image description here

Then select the correct SDK version in Project Settings > Project & Modules.

My build time are now twice faster, bingo!

I hope that can help a few of you.

Upvotes: 5

iron_bat
iron_bat

Reputation: 17

I encountered the problem on Apple M2 Pro with Ultimate version. Turning on Displays have separate Spaces reduce the lagging for me.

Upvotes: 0

user2333516
user2333516

Reputation: 111

You can see the memory usage of your application and increase it accordingly if required. In my case, it was slow because of low memory.

  1. Enable the memory indicator by checking it (View -> Appearance -> Status Bar Widgets -> Memory Indicator). With this, now you can see memory usage details in the bottom right corner of your Intellij IDE.
  2. Increase the memory if it's exhausted more than 80% of available memory by following: Click on Help -> Change Memory Settings -> <>)

Memory Settings

Upvotes: 11

Gergely Molnar
Gergely Molnar

Reputation: 31

I had the same issue with same MBA.

I changed the runtime to OpenJDK 18 and now it is totally smooth :) Help -> Find action -> Choose boot runtime for the IDE

I experimented with a few other JDKs, maybe Azul was the fastest. Also, I have updated Xmx: Help -> Edit Custom VM Options and updated to 2048m

To me, seems like the issue is resolved now or at least way better.

Upvotes: 3

shotmeinthehead
shotmeinthehead

Reputation: 1301

From dive deep into community i found this reddit post https://www.reddit.com/r/IntelliJIDEA/comments/q05b29/intellij_idea_for_m1_macbook/ its basicly tells you to install Rosetta2, also battery-consuming, I think it just best if you use mac mini setup(not a macos user, but wish to anw)

Upvotes: 0

Konstantin Annikov
Konstantin Annikov

Reputation: 12865

Try EAP version of IntelliJ IDEA 2022.2, which runs on JBR 17 with Metal framework.

Upvotes: 1

Roberto Sotar
Roberto Sotar

Reputation: 1

I download the M1 version for intellij ultimate and I have a incredible improve in performance. BTW: I have a macbook pro 13' with 16gb ram and 1TB ssd

intellij environment

IntelliJ IDEA 2022.1.1 (Ultimate Edition) Build #IU-221.5591.52, built on May 10, 2022 Licensed to ******************** Subscription is active until ********. Runtime version: 11.0.14.1+1-b2043.45 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 12.3.1 GC: G1 Young Generation, G1 Old Generation Memory: 1024M Cores: 8 Registry: *************

Non-Bundled Plugins: monokai-pro (1.8.1) com.vincentp.gruvbox-theme (0.5.4) com.intellij.plugins.macoskeymap (221.5591.19) com.github.rmatafonov.cucumber-scenarios-indexer (1.1.0) com.github.chencn.yamlandprops (1.0.5) net.lagerwey.cucumber-kotlin (2022.1.0) dev.eltonsandre.intellij.spring.assistant.plugin (1.5.2)

Kotlin: 221-1.6.21-release-337-IJ5591.52

Upvotes: 0

Related Questions