0

The performance of grails app is terribly slow. It needs at least 5-7 seconds to load a page. Sometimes will prompt me OutOfMemory and then server error 500 for every page.

The terribly slow performance seriously affects my work and I am unable to test and develop the project in an acceptable time. I have to deal with this problem first.

I tried to:

  1. Config the settings in idea64.exe.vmoptions and idea.exe.vmoptions like the settings in development handbook.
  2. Config the settings of Java in Java Control Panel that I added a Runtime Parameters –Xms-4096m.
  3. Config the settings of %GRAILS_HOME%\bin\startGrails.bat, GRAILS_OPTS.

However, this situation is not improveing.

I am using Win7-64 bit, 8GB Ram, Intellij 13.0.2 to develop.

Please help. Thank you very much!!

SAT
  • 647
  • 1
  • 12
  • 23

2 Answers2

2

This is likely to be an issue with your database lookup.

Out of memory errors are probably caused by bringing back too much data (possibly filtering in the JVM instead of the database query).

Slowness is possibly caused again by bringing back too much data, or by n+1 selects

Community
  • 1
  • 1
lance-java
  • 25,497
  • 4
  • 59
  • 101
  • Thank you. But I think possibly not that reason, becuase my teammates use the same sources but just my computer is sooooo slow. And I found that my java in task manager only get around 1G, but my teammate get around 2-3G. Anyway, thank you for your help! – user3454870 Mar 25 '14 at 03:44
0

Thank you for @Houcem Berrayana answer: Try to increase memory by using GRAILS_OPTS env variable

I just add the environment variable GRAILS_OPTS with parameter -Xms4096, then the Grails app run so fast!!

Thank you again!