[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: OMG - performance issue with Scheme engraver
From: |
David Kastrup |
Subject: |
Re: OMG - performance issue with Scheme engraver |
Date: |
Tue, 10 Jul 2018 16:48:54 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Urs Liska <address@hidden> writes:
> Hi all,
>
> after completing most of the work of reviewing the scholarly.annotate
> module I realize that it (presumably one small change) is a total
> performance killer, and I need some help tracking it down.
Well, one thing just jumping out at me is
((process-acknowledged translator)
(for-each
(lambda (grob)
[...]
;; reset list to prevent multiple processing.
;
; TODO: I don't understand why I can kill *all* the list
; after having processed *one* grob.
; What happens to any other annotated grobs (at the same
time)?
; I know it is possible to annotate multiple post-events,
for example.
(set! all-grobs '())))))))
all-grobs))
That's just garbage. If you want to stop processing the list in spite
of having started it with for-each, you need a non-local jump
(catch/throw).
The list processed by for-each has no connection at all with what you
store in all-grobs inside of the loop. And it does not appear like you
even bother resetting all-grobs at all when you don't reach the
conditional passage inside, letting it grow at will.
--
David Kastrup
- OMG - performance issue with Scheme engraver, Urs Liska, 2018/07/10
- Re: OMG - performance issue with Scheme engraver, David Kastrup, 2018/07/10
- Re: OMG - performance issue with Scheme engraver,
David Kastrup <=
- Re: OMG - performance issue with Scheme engraver, Urs Liska, 2018/07/10
- Re: OMG - performance issue with Scheme engraver, Urs Liska, 2018/07/10
- Re: OMG - performance issue with Scheme engraver, Urs Liska, 2018/07/11
- Re: OMG - performance issue with Scheme engraver, David Kastrup, 2018/07/11
- Re: OMG - performance issue with Scheme engraver, Urs Liska, 2018/07/11
- Re: OMG - performance issue with Scheme engraver, David Kastrup, 2018/07/11