[Top][All Lists]

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

Re: lilypond hangs

From: Keith OHara
Subject: Re: lilypond hangs
Date: Thu, 5 Jan 2012 03:40:44 +0000 (UTC)
User-agent: Loom/3.14 (

Werner LEMBERG <wl <at>> writes:

> Look at the attached two files:
> The first file has 74 bars of a single voice, and `time' shows me the
> following for processing it:

> The other one is the same as the first file but has only 37 bars

> It seems that we have some very bad exponential behaviour in
> processing somewhere...

>     line-width = 18000\cm
>     ragged-right = ##t
>     ragged-last-bottom = ##f

Well, you are creating an unusual line-breaking optimization problem.

I think LilyPond uses a "total-fit" line-breaker, as made famous by TeX.
The number of possible breaking patterns does go up exponentially with
measure count (or word count for the TeX case).  Good algorithms limit
the number of breaking patterns that get evaluated, so that processing 
time increases slower-than-exponentially for large measure count.

Here you have a case where you force the measures to fill more lines 
than they would need, and "ragged-right" makes all line-breaks feasible.
You may have deprived the algorithm of its means to limit the number
of line-breaking patterns it needs consider.

reply via email to

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