[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Keep parsed document in memory
From: |
David Kastrup |
Subject: |
Re: Keep parsed document in memory |
Date: |
Mon, 22 Feb 2016 12:27:51 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Urs Liska <address@hidden> writes:
> So, let's assume we already had implemented a server daemon mode for
> LilyPond.
> Would it be possible to make that daemon keep a representation of the
> *parsed* document in memory?
>
> OK, looking at it from traditional use-cases this might seem
> nonsensical. Why would you want to recompile an unchanged document?
> Well, if I'm not mistaken the engraving can still be influenced *after*
> the parsing by applying tweaks and overrides through engravers. I'm
> concretely talking about the edition-engraver but eventually a newly
> developed tool based on the current edition-engraver. And if I'm able to
> do that *and* keep the parsed document in memory I could then recompile
> the score or excerpts from it (using skipTypesetting) without
> re-parsing.
I think you grossly overestimate the time LilyPond spends on parsing.
> As most tweaks in the finishing stage of a project will only affect
> the current system this would mean the recompilation can
>
> * skip the Guile set-up
> * skip the document parsing
> * engrave only a single system
Page layout, page breaking and so on are global. LilyPond does not
engrave single systems independently from other systems.
> So, does this seem feasible at all (that is: *is* there actually
> something like a representation that could be kept in memory)?
LilyPond reads and collects the input (including top-level input) into
books. They are "something like a representation" kept in memory, but
creating them is consuming the smallest part of LilyPond's processing
time.
--
David Kastrup