@CompileStatic /@GrailsCompileStatic

22 views
Skip to first unread message

clr meno

unread,
Mar 31, 2017, 10:18:27 AM3/31/17
to Grails Dev Discuss
Will @CompileStatic /@GrailsCompileStatic improve performance? Is one preferred over the other?

Jeff Brown

unread,
Mar 31, 2017, 10:37:18 AM3/31/17
to Grails Dev Discuss
On 31 Mar 2017, at 16:18, clr meno wrote:

> Will @CompileStatic /@GrailsCompileStatic improve performance? Is one
> preferred over the other?
>

Yes, they both improve performance.

Prefer @GrailsCompileStatic. For most code they behave exactly the
same. The difference is that we associate some type checking extensions
with @GrailsCompileStatic that are familiar with Grails idioms like
dynamic finders, constraints DSL, etc. to allow static type checking and
static compilation in places where @CompileStatic would not work because
the default type checker can’t verify those things.



JSB

--
Jeff Scott Brown
OCI Grails Practice Lead
Principal Software Engineer

Autism Strikes 1 in 166
Find The Cause ~ Find The Cure
http://www.autismspeaks.org/
Reply all
Reply to author
Forward
0 new messages