lilypond-devel
[Top][All Lists]
Advanced

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

Can we refactor output-svg.scm to avoid regexp?


From: K.L.
Subject: Can we refactor output-svg.scm to avoid regexp?
Date: Thu, 29 Oct 2020 10:27:25 +0800

Hello guys.

I ran a profiling for SVG backend engraving, I saw the most time cost
(95%+) is taken by regexp execution.

It seems the usage of regexps in output-svg.scm is to extract vector font
content fragments from font svg assets. Can we refactor this work by an XML
parser, maybe in C++?

I saw there is another alternate option, svg-woff. But I encountered the
scm error:

> output-svg.scm:448:16: Unbound variable: paper
>

It seems an unresolved old bug for some years after googling it.

This may be the biggest performance bottleneck of SVG backend at present,
once fixed, we will get huge improvement.

Any ideas?

[image: image.png]
[image: image.png]

PNG image

PNG image


reply via email to

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