Re: Groovy 3 very slow stub generation

2020-01-17 Thread Paolo Di Tommaso
Hi Daniel, Groovy 2.5.8: https://gradle.com/s/eqjp6767u5n2o Groovy 3.0.0: https://gradle.com/s/orr64x7ilfwpu Regarding the slow IntelliJ build, sure I'll report to them however I saw clearly it stuck on the Groovy stub generation, and it works fine with the prior version. Therefore it makes me th

RE: Groovy 3 very slow stub generation

2020-01-17 Thread Milles, Eric (TR Tech, Content & Ops)
Paolo, Could you add two additional trials to your dataset? (1) Groovy 2.5.9 and (2) Groovy 3.0.0 with -Dgroovy.antlr4=false (disable Parrot Parser). This way, we could tell if recent changes that also went into 2.5.9 are an issue or if the slowness is directly related to the new antlr4 parsing

RE: Groovy 3 very slow stub generation

2020-01-17 Thread Daniel.Sun
FYI. ``` compileGroovy { groovyOptions.fork = true groovyOptions.forkOptions.jvmArgs += ["-Dgroovy.antlr4=false"] // disable the Parrot parser } ``` Cheers, Daniel.Sun - Apache Groovy committer & PMC member Blog: http://blog.sunlan.me Twitter: @daniel_sun -- Sent from: http://g

RE: Groovy 3 very slow stub generation

2020-01-17 Thread Daniel.Sun
If you find the performance issue is gone when you disable the Parrot parser with `-Dgroovy.antlr4=false`, you can try to enable the Parrot parser again and apply `-Dgroovy.antlr4.cache.threshold=200` shown as follows. ``` compileGroovy { groovyOptions.fork = true groovyOptions.forkOption

Re: RE: Groovy 3 very slow stub generation

2020-01-17 Thread Daniel Sun
I compared the time cost by antlr2 parser and Parrot parser via running the following script "Parse.groovy", which is placed under directory "nextflow-master\modules\nextflow\src\main\groovy\nextflow"[1]: The heap size is set to 2G, i.e. "-Xms2g -Xmx2g" 1) run antlr2 parser `groovy Parse.groovy

Re: RE: Groovy 3 very slow stub generation

2020-01-17 Thread Daniel.Sun
Here is the detailed result: results.zip Under Windows, we can set the JVM option by: set JAVA_OPTS=-Xms2g -Xmx2G -Dgroovy.antlr4.cache.threshold=600 then run `groovy Parse.groovy 2` or `groovy Parse.groovy 4` Cheers, Daniel.Sun

Re: RE: Groovy 3 very slow stub generation

2020-01-17 Thread Paolo Di Tommaso
Hi, Using "-Dgroovy.antlr4=false", it takes 38s, therefore, it is similar to groovy 2.5. When setting both "-Dgroovy.antlr4.cache.threshold=200" or "-Dgroovy.antlr4.cache.threshold=600", it is slow: 1m 41s the first, and 1m 48s the second. p On Fri, Jan 17, 2020 at 10:11 PM Daniel.Sun wrote: