CVSROOT: /cvsroot/lilypond Module name: lilypond Branch: Changes by: Han-Wen Nienhuys <[EMAIL PROTECTED]> 05/08/22 16:07:42
Modified files: . : ChangeLog scm : ps-to-png.scm Log message: remove dir-re function. (make-ps-images): generate page names, instead of globbing them. This brings down LilyPond memory usage for make web by a factor 10. (backportme?) CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.4061&tr2=1.4062&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/ps-to-png.scm.diff?tr1=1.14&tr2=1.15&r1=text&r2=text Patches: Index: lilypond/ChangeLog diff -u lilypond/ChangeLog:1.4061 lilypond/ChangeLog:1.4062 --- lilypond/ChangeLog:1.4061 Mon Aug 22 15:50:36 2005 +++ lilypond/ChangeLog Mon Aug 22 16:07:41 2005 @@ -3,12 +3,12 @@ * scm/ps-to-png.scm: remove dir-re function. (make-ps-images): generate page names, instead of globbing them. This brings down LilyPond memory usage for make web by a factor - 10. + 10. (backportme?) * scripts/lilypond-book.py (Lilypond_snippet.png_is_outdated): don't use glob. With 3000 files, globbing - Documentation/user/out-www/ can take too much time. - + Documentation/user/out-www/ can take too much time. (backportme?) + * lily/lily-guile.cc (gulp_file_to_string): take size argument. * lily/general-scheme.cc (LY_DEFINE): take optional size argument. Index: lilypond/scm/ps-to-png.scm diff -u lilypond/scm/ps-to-png.scm:1.14 lilypond/scm/ps-to-png.scm:1.15 --- lilypond/scm/ps-to-png.scm:1.14 Mon Aug 22 15:50:37 2005 +++ lilypond/scm/ps-to-png.scm Mon Aug 22 16:07:41 2005 @@ -68,8 +68,7 @@ (status (system cmd)) (s (gulp-file d bbox 10240)) (m (string-match BOUNDING_BOX_RE s))) - (display m) - (newline) + (if m (list->vector (map (lambda (x) (string->number (car x))) (vector->list m))) @@ -100,7 +99,7 @@ (let* ((status 0) (percentage (* 100 (/ 1.0 factor))) (old (string-append file ".old"))) - + (rename-file file old) (my-system be-verbose #t @@ -173,7 +172,7 @@ (set! files (map (lambda (n) - (format "~a-page~a.png" base n)) + (format "~a-page~a.png" base (1+ n))) (iota page-count))) (list (format "~a.png" base))) @@ -181,7 +180,7 @@ (begin (map delete-file files) (exit 1))) - + (if (and rename-page-1? multi-page?) (begin (rename-file (re-sub "%d" "1" pngn) png1) _______________________________________________ Lilypond-cvs mailing list Lilypond-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-cvs