"Phil Holmes" <m...@philholmes.net> writes:

> Lilypond has always used a lot of memory.

That does not mean that this was correct.

> If I run the test file Eluze created on 2.12 it goes up to just shy of
> a gig.  I'd assume there are minor variations in the amount of memory
> the various layout systems use, and 2.12 was just too little to cause
> memory to be allocated, and subsequent 2.13 versions just too much.

For every potential page break point, there is a sequence of optimal
page break points before it.  To evaluate its score, I _only_ need to
evaluate the score of the page between the currently considered
breakpoint and all possible _immediately_ preceding breakpoints since
those already _have_ been scored.

So as the number of pages grows, the optimal page break point sequences
coalesce.

If there are potentially 100 possible page break points on a single
page, there will not be more than 100 page break point sequences under
consideration at any step if we use _optimal_ page breaking.

So after something like 5 pages, memory usage should not grow more than
linear with the length of the document.  If it does, we are doing
something wrong.

-- 
David Kastrup


_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond

Reply via email to