From: Han-Wen Nienhuys Date: Tue, 2 Jan 2007 12:59:10 +0000 (+0100) Subject: only call profile-measurements when appropriate. X-Git-Tag: release/2.11.8-1~41^2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=4636871eb1553366d92750f1dc7aeb8012bb81a0;p=lilypond.git only call profile-measurements when appropriate. --- diff --git a/scm/lily.scm b/scm/lily.scm index d63890af0a..786c075d68 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -357,7 +357,7 @@ The syntax is the same as `define*-public'." (define (profile-measurements) (let* ((t (times)) (stats (gc-stats))) - + (list (- (+ (tms:utime t) (tms:stime t)) @@ -569,7 +569,7 @@ The syntax is the same as `define*-public'." )) (let* ((failed '()) - (start-measurements #f) + (start-measurements (ly:get-option 'profile-measurements)) (handler (lambda (key failed-file) (set! failed (append (list failed-file) failed))))) @@ -577,7 +577,8 @@ The syntax is the same as `define*-public'." (lambda (x) (gc) - (set! start-measurements (profile-measurements)) + (if start-measurements + (set! start-measurements (profile-measurements))) (lilypond-file handler x) (if (ly:get-option 'dump-profile) (dump-profile x start-measurements (profile-measurements)))