On 21 déc. 2012, at 10:09, d...@gnu.org wrote:

> On 2012/12/21 07:59:02, MikeSol wrote:
>> Hey all,
> 
>> I'm ok w/ this on the countdown but can someone check out David's
> suspicion that
>> this slows stuff down by O(n^3)?  I definitely won't push this if it
> slows
>> LilyPond down to a crawl.
> 
> I am not ok with that.  It looks really, really, really expensive.  I
> don't see what would be wrong with just setting a context property flag
> axis-group-active in the engraver and refuse to maintain an axis group
> if the flag is already set.

In general, elements should never recursively be elements of themselves.  This 
seems like a safe assumption for LilyPond programming, especially as recursion 
through elements lists becomes more prevalent in the code base.  This is an 
implicit assumption with which we've been programming all along, but the 
advantage of making it explicit via a check in the Pointer_group_interface is 
that it alerts users of this.  We could maybe create a flag 
-recursive-element-leniency to allow for this if people really want it.

Keith thinks that it's worth it to put this in.  I do too, but I'd like 
unanimity, so if you still think this should not be part of LilyPond then I'll 
scrap the patch.  Note that I'm not adverse to any of your suggestions about 
the engravers, but I think that this is a healthy patch for LilyPond that will 
fix potential segfaults down the road (inadvertent user mistakes w/ element 
lists) in addition to the one reported.  Of course, if it slows LilyPond down 
too much then it's not worth it, but I'm ok with it being in a development 
version and then reverting it if people complain too much about speed issues.

Cheers,
MS
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to