bug-lilypond
[Top][All Lists]
Advanced

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

Issue 971 in lilypond: SVG backend: problem with memory usage and multi


From: lilypond
Subject: Issue 971 in lilypond: SVG backend: problem with memory usage and multi-page SVG output
Date: Sun, 10 Jan 2010 02:00:22 +0000

Status: Accepted
Owner: pnorcks
Labels: Type-Defect Priority-Medium

New issue 971 by pnorcks: SVG backend: problem with memory usage and multi-page SVG output
http://code.google.com/p/lilypond/issues/detail?id=971

Currently, the SVG backend caches SVG fonts (Emmentaler and/or Aybabtu) in
a hash table to speed up glyph extraction.

But when larger scores (with several pages) are produced, memory usage
sometimes skyrockets.  This doesn't happen for every score.

For example, if I use 2.13.10 to create SVG output for this score:
http://www.mutopiaproject.org/cgibin/piece-info.cgi?id=1689 , 17 pages are
produced, and memory usage maxes out at 1.7GB (64-bit machine).

I suspect this is a problem with using hash tables, because if I apply the
patch below, the processing time is greater, but only 800MB of memory are
consumed.


diff --git a/scm/output-svg.scm b/scm/output-svg.scm
index 64cb52e..5dbfb44 100644
--- a/scm/output-svg.scm
+++ b/scm/output-svg.scm
@@ -260,7 +260,7 @@
     (substring svg-font (+ start 7) (- end 1))))

 (define (cache-font svg-font size glyph)
-  (let ((all-glyphs (svg-defs (cached-file-contents svg-font))))
+  (let ((all-glyphs (svg-defs svg-font)))
     (if (list? glyph)
        (extract-glyph-info all-glyphs glyph size)
        (extract-glyph all-glyphs glyph size))))


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings




reply via email to

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