lilypond-devel
[Top][All Lists]
Advanced

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

Re: dumb stacking page breaker


From: Trevor Bača
Subject: Re: dumb stacking page breaker
Date: Tue, 10 Jul 2007 13:34:32 -0500

On 7/10/07, Nicolas Sceaux <address@hidden> wrote:
Joe,

First, thank you very much for the bunch of bug fixes you just commited,
in particular the ones regarding volta brackets, this is a relief.

When building scores >>20 pages (some of my scores have more than 150),
the time and amount of memory used by the ly:optimal-page-breaking
function is crippling (it also used to be the case with the original
optimal page breaking function).

Before you wrote the page breaking stuff, I used a custom dumb page
breaker, which just stacked the systems on a page, until there was no
space left on it; then it went on with a new page, etc.  It had two
advantages:

 - it managed to build large books in a very limited time and with
   little consing;

 - it completely filled pages composed exclusively of text, without
   leaving large amounts of white space on those pages as did the
   original optimal page breaking function (what is "optimal" with music
   systems is not with text)

But I had to get rid of it, since it could not use all the new features
made available by your new page breaking code.

I'd like to write something like that using the new infrastructure.

 1) compute the line breaks in the most straightforward way, that is
    without considering page breaks or the number of systems per page.
    Just lines as regular as possible wrt horizontal spacing and
    considering the manual line break permissions.

 2) compute the page breaks by stacking on each page as many lines as
    possible, and account for manual page break permissions.

I think the implementation of 2) won't be a huge problem; however, I
don't understand precisely how to achieve 1) by reading the existing
code.  Might you give me some pointers to places in the code where I
could get some inspiration?

Hi Nicolas,

A "dumb" breaker on top of the cool new infrastructure appeals to me
too. I can't offer any real help thinking through the problem, but I
can offer encouragement in that I, too, would take advantage of such a
set-up.

(I usually fix the vertical positions of all systems in the score
absolutely at even intervals running down the page and leaving
large(r) amounts of whitespace between systems than in classical
engraving custom; and since I force these values, I don't give the
newer breaking algorithm (or the older breaking algorithm, for that
matter) a chance to work its magic.)



--
Trevor Bača
address@hidden

reply via email to

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