Hi Eric,

      Thanks a lot for your help. The top time-consuming method `closure` is
an internal method of the implementation of antlr4. It's hard for us to
change. Luckily, Sam Harwell, the co-author of antlr4, is trying to help us
tune the performance of the antlr4 parser, too. But Groovy's grammar is
quite complicated and contains some ambiguities, so it's hard to tune...
fingers crossed...

      Also, I have an idea as a workaround: let's initialize the DFA cache
by parsing usual code snippets, then serialize the DFA cache into a file,
which will be bundled in the groovy-3.0.0.jar. When groovy starts, the file
containing the DFA cache will be loaded, thus the performance of parsing can
be improved a lot at the first time of parsing.

Cheers,
Daniel.Sun



-----
Apache Groovy committer & PMC member 
Blog: http://blog.sunlan.me 
Twitter: @daniel_sun 

--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html

Reply via email to