[
https://issues.apache.org/jira/browse/GROOVY-11726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18140785#comment-18140785
]
ASF GitHub Bot commented on GROOVY-11726:
-----------------------------------------
daniellansun merged PR #3228:
URL: https://github.com/apache/groovy/pull/3228
> Performance Regression in GroovyClassLoader.parseClass After Migration to
> Groovy 4
> ----------------------------------------------------------------------------------
>
> Key: GROOVY-11726
> URL: https://issues.apache.org/jira/browse/GROOVY-11726
> Project: Groovy
> Issue Type: Bug
> Reporter: Puneet Singla
> Priority: Critical
> Labels: performance
>
> After upgrading to Groovy 4, we have observed a *significant increase in
> compilation time* when using the following method from {{GroovyClassLoader}}:
> {code:java}
> public Class parseClass(final GroovyCodeSource codeSource, boolean
> shouldCacheSource) throws CompilationFailedException
> {code}
> This function was previously performing optimally in Groovy 3.0.13, but with
> Groovy 4.0.24, compilation latency has *increased significantly.* Earlier it
> used to take about 4 minutes to compile a bunch of scripts but now it is
> taking about 9 minutes for the same scripts.
> ----
> *Steps to Reproduce:*
> # Use {{GroovyClassLoader}} to compile Groovy scripts at runtime using the
> {{parseClass(GroovyCodeSource, boolean)}} method.
> # Benchmark the time taken before and after the migration to Groovy 4.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)