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 the strip-tree-before in indent-padding.str rule or the AddIndentPaddingString 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

On 9 June 2010 at 18:21 Lennart Kats closed this issue.

On 9 June 2010 at 18:21 Lennart Kats commented:

Should better in r20981. Still, a more imperative implementation like the one implemented in Java may be much faster.


On 9 June 2010 at 18:44 Lennart Kats reopened this issue.

On 14 July 2010 at 09:59 Lennart Kats commented:

Fixed in r21100.


On 14 July 2010 at 09:59 Lennart Kats closed this issue.

Log in to post comments