Surprised to hear this about IntelliJ, have used it for many years without issue on substantially larger projects. Can't say for sure, but your freezes might be a solvable artifact of your setup.
I've increasing the JVM heap as much as I reasonably could but giving 2GB of Heap to an IDE on a 16GB system seems wasteful.