• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

IntellIj Slow to Build

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 8132
572
Mac OS X VI Editor BSD Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 6
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Liutauras,

    Thanks for your advice! It was very helpful.
     
    Consider Paul's rocket mass heater.
    reply
      Bookmark Topic Watch Topic
    • New Topic