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

Daniel Sun resolved GROOVY-8399.
--------------------------------
    Fix Version/s: 3.0.0-rc-2
       Resolution: Fixed

> ImportCustomizer is applied once per class (should be once per module)
> ----------------------------------------------------------------------
>
>                 Key: GROOVY-8399
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8399
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 3.0.0-rc-2
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> CompilerConfiguration with ImportCustomizer gets applied once per class in a 
> source unit.  If unit has a lot of classes this can cause a lot of extra 
> imports 
> processing.{{CompilationUnit.applyToPrimaryClassNodes(PrimaryClassNodeOperation)}}
>  is the loop that drives the CompilationCustomizers.  
> {{org.codehaus.groovy.control.customizers.ImportCustomizer.call}} is where 
> imports are added.  Could check if ClassNode param is the primary class in 
> the module before applying.  Or {{ModuleNode}} could allow {{addImport}} and 
> just dedup internally.



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

Reply via email to