Reputation: 10280
I work with files with 30,000+ lines in Java all the time, and IntelliJ seriously struggles to keep up. It makes my entire machine unusable, and it's a 10-core/20-thread i7 with 64GB RAM...
What are some tips to improve the performance of IntelliJ when working with giant class files? I already dedicate 16GB RAM via -Xmx16g -Xms16g
in idea.exe.vmoptions
and idea64.exe.vmoptions
Upvotes: 3
Views: 541
Reputation: 12511
The file is simply too big. Even 3000 lines is too much, refactor it.
You can easily diagnose that you have enough of heap, by enabling Memory Indicator
in settings, or by using VisualVM.
However the problem is probably not memory related, but Syntax/Inspection related. You can try to enable Power Save Mode
(Main Menu | File) to see if it helps.
Syntax check and Inspections can be disabled per file using this button:
Also if you hover over the colored box in the right upper editor corner, you can see what those inspections are doing... Chances are, you will see some correlations.
You could also try CPU Sampling in VisualVM, you might recognize what the IDE is doing simply by the name of a class and perhaps disable some plugin or feature.
Or just report a performance problem - https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems
Upvotes: 5