The BacktrackingParser constructor method allocates a huge int array (1 << 20) for recording actions. Unfortunately allocating this array is dirt slow (it may even be causing the garbage collector to fire).
When using LPG to parse a large project in CDT I have noticed huge performance gains by pooling and reusing BacktrackingParser objects rater than instantiating one for every file. However, now I have to write and maintain an object pool for parsers, this shouldn't be necessary.
I tracked down this bottleneck using TPTP.
Mike Kucera
Software Developer
IBM CDT Team
Logged In: NO
Discussion of this issue on the CDT bugzilla:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=191121