[ 
https://issues.apache.org/jira/browse/GROOVY-9408?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Sun closed GROOVY-9408.
------------------------------
    Resolution: Fixed

> Avoid unnecessary looking up default import classes when resolving types
> ------------------------------------------------------------------------
>
>                 Key: GROOVY-9408
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9408
>             Project: Groovy
>          Issue Type: Improvement
>            Reporter: Daniel Sun
>            Assignee: Daniel Sun
>            Priority: Major
>             Fix For: 4.0.0-alpha-1, 3.0.2
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> {{ResolveVisitor}} will try to look up default imported classes from these 
> packages {{"java.lang.", "java.util.", "java.io.", "java.net.", 
> "groovy.lang.", "groovy.util."}}.
> For example, when compiler finds {{Closure}} in the AST, it will try to look 
> up {{"java.util.Closure"}}, if failed, then {{"java.io.Clousre"}}, ..., at 
> last look up {{"groovy.lang.Closure"}}.
> As we can see, some of the above looking up is not necessary, we can avoid 
> them by warming up 
> {{org.codehaus.groovy.control.ResolveVisitor#DEFAULT_IMPORT_CLASS_AND_PACKAGES_CACHE}}
>  
> P.S. warming up the cache costs about 0.226s on my machine
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to