lilypond-user
[Top][All Lists]
Advanced

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

Re: Find Voice/etc. context from Staff/etc. context


From: David Kastrup
Subject: Re: Find Voice/etc. context from Staff/etc. context
Date: Thu, 12 Jul 2018 10:03:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Urs Liska <address@hidden> writes:

> Am 12.07.2018 um 00:13 schrieb David Kastrup:
>>
>>> By now I would know how to link that information to the grob in
>>> acknowledgers and read it later - but that would mean I have to look
>>> up the source-engraver context for *all* grobs and not only for those
>>> (the annotated grobs) where I actually need them.
>> So?  How many millions per time step do you expect?
>
> per time step and context I only expect a few dozens. But I was
> reluctant to do that (store but mainly retrieve the context) for
> *every* grob in the score when I only have very few actual
> annotations.
>
> But it appears to work that way, and I assume this is just the typical
> tendency of trying to optimize on the wrong end ;-)

The context of an engraver/translator is stored in an engraver in a
fixed field.  As opposed to grob properties (stored in a hierarchical
alist), access is basically instantaneous.  Storing grobs plus context
(or, if you want to really really save the access until you need it,
grobs plus source engraver) in an alist is simple enough.

-- 
David Kastrup



reply via email to

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