Please try 3.0.6+, we have tuned the performance a lot.
Cheers, Daniel Sun On 2020/10/16 18:58:28, Stephen Mallette <spmalle...@gmail.com> wrote: > Hello, > > I happened to be testing some issues related to this pull request I > submitted the other day: > > https://github.com/apache/groovy/pull/1405 > > In testing between groovy 2.5.x and 3.x I've noticed a considerable > performance difference when pasting long multi-lined scripts. 2.5.x is > quite quick to accept the input whereas 3.x seems to slow more and more as > additional lines are consumed. While I did more complex tests trying to get > to the bottom of the problem, it's fairly easy to recreate with a simple > addition script: > > 1 + 10 + > 1 + 10 + > 1 + 10 + > 1 + 10 + > 1 + 10 + > ... repeated a bunch of times and then ended with > 1 > > copy that out of your text editor and just paste it into both versions of > groovsh and see the difference. I've found 500 lines demonstrates it well > but you could probably get away with less and still see the difference of > evaluation at play. > > I tried to do some profiling to try to isolate the problem myself, but > things got a little too deep into antlr4 for me and I got lost. Does anyone > have any ideas as to what might be different for 3.x? >