[ https://issues.apache.org/jira/browse/GROOVY-10934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17691750#comment-17691750 ]
Eric Milles edited comment on GROOVY-10934 at 2/21/23 8:14 PM: --------------------------------------------------------------- Thanks for the script and timings. Can you try using the ImportCustomizer to supply these extras via CompilerConfiguration instead of as part of the source to parse and resolve? Update: In the attached script (Groovy10934.groovy) I demonstrate running your script (>9000ms) and with imports via config (~1700ms). The time spent in groovysh execute is quite minimal (~150ms). was (Author: emilles): Thanks for the script and timings. Can you try using the ImportCustomizer to supply these extras via CompilerConfiguration instead of as part of the source to parse and resolve? > Performance when Resolving Import Statement > ------------------------------------------- > > Key: GROOVY-10934 > URL: https://issues.apache.org/jira/browse/GROOVY-10934 > Project: Groovy > Issue Type: Question > Components: Groovysh > Affects Versions: 3.0.5, 2.5.17 > Reporter: Ken Hu > Priority: Major > Attachments: Groovy10934.groovy > > > The time it takes to resolve imports for scripts seems to have increased > substantially since fixing the issue for GROOVY-5103. This can have a major > impact on performance when a simple script that contains many imports is > executed because the majority of the time will be spent resolving the > imports. Are there any workarounds for this? -- This message was sent by Atlassian Jira (v8.20.10#820010)