lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Limit looping in Grob::common_refpoint (issue 4079) (issue 134600043


From: address@hidden
Subject: Re: Limit looping in Grob::common_refpoint (issue 4079) (issue 134600043 by address@hidden)
Date: Sun, 7 Sep 2014 09:29:21 +0300

On 7 sept. 2014, at 09:20, address@hidden wrote:
> 
> I don't like it.  The maximum range of a variable is an arbitrary value
> and this "loop avoidance" will not do us much good on a 64-bit
> architecture.
> 
> If this is a real concern, we should be either using a tortoise/hare
> algorithm here in order to bomb out on circular references.
> 
> Or, much preferable, we should catch any such cases where the circular
> reference is established.  

This can usually be triggered by including certain engravers twice (dynamic 
align, for example). I tried once to write an algorithm that detected circular 
dependencies before allowing parent relationships to be created but it slowed 
LilyPond down by around 3%. I'm not sure of a good general solution without 
taking a performance hit.

Cheers,
MS


> This can only happen when an existing grob
> already established as a parent of some other grob gets its parent
> pointed to another existing grob.
> 
> Since it is much too late by the time Grob::common_refpoint is called to
> figure out the culprit in the circular refpoint chain, that's close to
> useless for debugging.
> 
> https://codereview.appspot.com/134600043/
> 
> _______________________________________________
> lilypond-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-devel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]