I took a look at the nextflow test (added a 100.times loop around the antlr4 
compile to increase the sample size) in jvisualvm.  In my sample collection 
(included below) org.antlr.v4.runtime.atn.ParserATNSimulator.closure(ATNConfig, 
ATNConfigSet, ATNConfigSet, Set<ATNConfig>, boolean, boolean, 
PredictionContextCache, int, boolean) used about 1/3rd of the compute time.



I tried making some minor changes to the closure and getEpsilonTarget methods, 
but wasn't able to achieve more than 2-4% improvement.  So, I think performance 
improvements will need to come from some of the other 10%-ish methods or from 
changes to the parser grammar that can reduce the number of transitions that 
need to be explored in the parse graph.



[cid:image001.png@01D5D766.3545CAA0]









-----Original Message-----
From: Daniel.Sun <sun...@apache.org>
Sent: Wednesday, January 29, 2020 3:25 PM
To: d...@groovy.incubator.apache.org
Subject: RE: RE: Groovy 3 very slow stub generation



Here is the flame graph for parsing all groovy source files under nextflow 
module[1] with the distribution built from master.



profile.svg 
<https://urldefense.proofpoint.com/v2/url?u=http-3A__groovy.329449.n5.nabble.com_file_t340716_profile.svg&d=DwICAg&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=TYmcOsETGHf1edCwWcLzRlUkEd_PF4RAn4e8iU-wZG0&s=zbVR_UFcVm2aox5USlCnz87SRu-F3QS1uBFuhfcixt8&e=
 
<https://urldefense.proofpoint.com/v2/url?u=http-3A__groovy.329449.n5.nabble.com_file_t340716_profile.svg&d=DwICAg&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=TYmcOsETGHf1edCwWcLzRlUkEd_PF4RAn4e8iU-wZG0&s=zbVR_UFcVm2aox5USlCnz87SRu-F3QS1uBFuhfcixt8&e=%20>
 >



Cheers,

Daniel.Sun

[1] 
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_nextflow-2Dio_nextflow_tree_master_modules_nextflow&d=DwICAg&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=TYmcOsETGHf1edCwWcLzRlUkEd_PF4RAn4e8iU-wZG0&s=GJ1f550pn5P_L1IMZDISe3B67vkNwRxR6UMN6sK6eUo&e=









-----

Apache Groovy committer & PMC member

Blog: 
https://urldefense.proofpoint.com/v2/url?u=http-3A__blog.sunlan.me&d=DwICAg&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=TYmcOsETGHf1edCwWcLzRlUkEd_PF4RAn4e8iU-wZG0&s=tOQaYLayumIHoyB0huGHV2uCTgQfH2DpTux-LGJA1Sw&e=

Twitter: @daniel_sun



--

Sent from: 
https://urldefense.proofpoint.com/v2/url?u=http-3A__groovy.329449.n5.nabble.com_Groovy-2DDev-2Df372993.html&d=DwICAg&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=TYmcOsETGHf1edCwWcLzRlUkEd_PF4RAn4e8iU-wZG0&s=WHRzQw88bMzPD29IhYV5cAXI4ZhmUJH_3s6BQKKdTlY&e=

Reply via email to