title: Grails app is too slow to startup
body: <p>I'm using grails 2.4.4 to develop a web application and Grails (using jetty plugin) is taking around 20 seconds to initialize and make the app available.</p>
  
  <p>I would be okay with this fairly long time but it turns to 3 minutes for older hardware to start up the whole thing and I need it to be faster because once the server has started performance is good and not a concern.</p>
  
  <p>Googling around found out in SO that jar scanning for servlet annotations could be the issue and disabled it for the classes in WEB-INF/lib and added this to the app context xml:</p>
  
  <pre><code>&lt;Call name="setAttribute"&gt;
      &lt;Arg&gt;org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern&lt;/Arg&gt;
      &lt;Arg&gt;nothing.jar$&lt;/Arg&gt;
  &lt;/Call&gt;
  </code></pre>
  
  <p>This helped cut down the time from 16s to 13s.
  Also tried building with servlet 2.5 configured instead of 3.0 (And moving to jetty 7) to try to further improve this since annotation scanning is a servlet 3.0 feature but the speed up was minimal (around 1s).</p>
  
  <p>My objective is to bring this time down to 6s since in the oldest hardware I have tested it took around 3 minutes so it is around 10 times slower and a 1 minute startup time would be somewhat tolerable.</p>
  
  <p>Im a little lost on how to achieve this. Looking through the logs saw that context initialization is taking around 2000ms</p>
  
  <p><em>2017-02-08 02:15:08,318 [main] INFO  context.ContextLoader  - Root WebApplicatio
  nContext: initialization completed in 2001 ms</em></p>
  
  <p>Is there any posibility to speed this up?</p>