• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

IntellIj Slow to Build

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IntellIj is slow to build my project. Are there any optimization tricks, other then buying a new PC, that can help speed things up?
 
Marshal
Posts: 7070
491
Mac OS X VI Editor BSD Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the bottom right hand corner, there are available memory allocated for the build process, how much does it show for you? (N out of X)

You could try to give Java build process more memory than it is given by default. Assuming you have enough on your machine.

Open Preferences, go to "Build, Execution, Deployment" --> Compiler, and set these options:

  • Build process heap size (Mbytes): 8000 (that is what I'm using)
  • Shared build process VM options: -Xmx2g (that is what I'm using)

  • Then, go to Help --> Edit Custom VM Options. Click "yes" to create a new options file and add:
    -Xms1024m
    -Xmx8192m
    -XX:ReservedCodeCacheSize=240m
    -XX:+UseCompressedOops


    Now, depending on the IntelliJ version you are using, the VM options might have additional stuff in it.  Update the ones which are shown above and don't modify other.

    After restarting your IDE you should see available memory in the bottom right corner increased.

    That should speed up build, at least it did for me.
     
    Jimmy Smitherson
    Greenhorn
    Posts: 4
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Liutauras,

    Thanks for your advice! It was very helpful.
     
    Lasagna is spaghetti flvored cake. Just like this tiny ad:
    Java file APIs (DOC, XLS, PDF, and many more)
    https://products.aspose.com/total/java
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!