lilypond-devel
[Top][All Lists]
Advanced

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

dumb stacking page breaker


From: Nicolas Sceaux
Subject: dumb stacking page breaker
Date: Tue, 10 Jul 2007 16:09:55 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin)

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?

nicolas




reply via email to

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