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: Mike Solomon
Subject: Re: Limit looping in Grob::common_refpoint (issue 4079) (issue 134600043 by address@hidden)
Date: Sun, 7 Sep 2014 20:29:09 +0300

On Sep 7, 2014, at 4:15 PM, address@hidden wrote:

> On 2014/09/07 06:20:59, dak 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.
> 
> Thanks for pointing that out.  I will make the limits template
> parameters and restrict them to the range of a 32-bit int when used in
> this method.  If someone with more knowledge of the internals can
> suggest saner limits, I will gladly use them instead.

I can’t think of a case where the depth of parenthood would go over a few grobs 
(5-6ish) in normal engraving.  Something like 1024 would be more than enough, 
after which a programming error could be issued.

> 
>> Or, much preferable, we should catch any such cases where the circular
> reference
>> is established.
> 
> I agree that fixing the root cause is the best thing to do.  I am not
> yet familiar enough with this stuff to do that, but this backstop is
> beneficial.  Termination is more user-friendly than endless looping.
> People tend to get angry when their time is wasted.
> 
> 

+1.  The only other solution I see is to check when the parental relationship 
is being created, but this check results in a performance hit.  If someone 
cooked up a speedy algorithm, then I think it would be a good idea to check at 
relationship-creation time.

Cheers,
MS

> 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]