Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Build a JavaFX Application Design a Better App Grids

Christopher Mlalazi
.a{fill-rule:evenodd;}techdegree seal-36
Christopher Mlalazi
Front End Web Development Techdegree Graduate 17,305 Points

RUN command

Craig Dennis 's run function seems to run fast than mine. I am using a MacBook Pro, and everytime I hit run, IntelliJ parses and builds code and this seems to take a while and I have to wait. I can imagine if say I was developing a project if I have to wait for so long everytime I want to test the code by hitting run. Am I doing something wrong?

2 Answers

William Li
William Li
Courses Plus Student 26,868 Points

I was asked to answer this question, but I haven't been in the Java community or written a single line of Java code for about 4~5 yrs, so my answer will be based upon my knowledge of Java & its tool from years ago.

Objectively speaking, Java isn't a very fast language, most of the popular Java IDEs (IntelliJ, Eclipse, Netbeans ...) were written entirely in Java. So no matter how well written and optimized their coebases might be, they are never going to have the same level of performance as Visual Studio or Xcode, which were written using C-family languages.

IntelliJ is one of those memory hog programs, it runs faster and better on good CPU w/ lots of RAM. Did you allocate enough heap memory for Intellij's vm in the setting? This is very important, because unless these values are set correctly, IntelliJ's performance will be severely handicapped for not being able to make good use of the onboard memory in your computer. Here's one StackOverflow post on this topic http://stackoverflow.com/questions/28760415/how-should-i-set-the-memory-for-intellij-14. There're many articles written on how to set the right values of Xms, Xmx, XX:MaxPermSize for JVM, you just need to do some googling & researching, and try out different numbers for these values to figure out what's the optimal # on your own MBP

Hope it helps.