lilypond-user
[Top][All Lists]
Advanced

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

Incremental compiling


From: Vaughan McAlley
Subject: Incremental compiling
Date: Thu, 9 Aug 2012 17:26:51 +1000

Following one of the tangents from the “Sibelius Software UK office
shuts down thread”, here’s a potential algorithm for incremental
compiling. It’s only a suggestion: sorry if it’s flawed or you don’t
like it!

• when Lilypond is compiled, a temp file is created, containing the
source file, and page-layout structure of the music. For example:
Page 1 has two systems
  System 1 contains measures 1-4
  System 2 contains measures 5-7
etc...

Maybe also a database of which measure (if any) the beginning of each
line of source is part of.

• if Lilypond is invoked with the --incremental option, Lilypond
compares its cached copy of the source file with the source file
presented, and finds the first point of difference. Then it knows
which measure it wants to be on the first page it’s actually
publishing

• then, beginning at the appropriate page, it lays out one or two
pages worth of music, using simple Finale-like rules of page layout
(if a measure is too wide, it goes to the next page)

• if in doubt, do a full compile

With large scores, compile time would be reduced to slightly more than
a one- or two-page score. Watching a compile, the “interpreting music”
stage is very quick compared to “preprocessing graphic elements” and
layout optimization, and the extra work would incur little overhead
(and could be done after the PDF file is produced).

Vaughan



reply via email to

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