indent-padding in imploder is slow on Java
Students reported a whopping 9 minutes compilation time for
https://mdsd-design2.googlecode.com/svn/trunk/Expell/trans/utils.str@r13
, which uses many string interpolation expressions. This performance problem seems to be caused by thestrip-tree-before
in indent-padding.str rule or theAddIndentPaddingString
rule that calls it.The real problem seems to be that for every
{indent-padding}
construct, the imploder has to walk the parse tree up to that point in the tree in order to find the column number where the construct started. For big parse trees and lots of string interpolation expression, doing so seems to be a problem. The pure Java imploder of Spoofax does not have this problem since it doesn’t try to be pure functional and just keeps a count of the column of the each character.Update: this only seems to affect the Java version.
Submitted by Lennart Kats on 9 June 2010 at 11:54
Issue Log
Should better in r20981. Still, a more imperative implementation like the one implemented in Java may be much faster.
Fixed in r21100.
Log in to post comments