[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: In verbose mode, dump time spent on parsing lily.scm and friends. (i
From: |
hanwenn |
Subject: |
Re: In verbose mode, dump time spent on parsing lily.scm and friends. (issue 573420043 by address@hidden) |
Date: |
Mon, 27 Jan 2020 00:34:08 -0800 |
Reviewers: lemzwerg,
Message:
done.
Description:
In verbose mode, dump time spent on parsing lily.scm and friends.
Please review this at https://codereview.appspot.com/573420043/
Affected files (+6, -6 lines):
M lily/guile-init.cc
M lily/main.cc
Index: lily/guile-init.cc
diff --git a/lily/guile-init.cc b/lily/guile-init.cc
index
553b7c1119d17ff3acda52d49fc581a97062caa8..b25b8bbfccaa5678188a23e977ac5a57d1b3d24a
100644
--- a/lily/guile-init.cc
+++ b/lily/guile-init.cc
@@ -18,6 +18,8 @@
along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "cpu-timer.hh"
+#include "international.hh"
#include "lily-guile.hh"
#include "main.hh"
#include "warn.hh"
@@ -56,6 +58,7 @@ ly_init_ly_module ()
for (vsize i = scm_init_funcs_->size (); i--;)
(scm_init_funcs_->at (i)) ();
+ Cpu_timer timer;
if (is_loglevel (LOG_DEBUG))
{
debug_output ("[", true);
@@ -65,6 +68,7 @@ ly_init_ly_module ()
}
scm_primitive_load_path (scm_from_ascii_string ("lily.scm"));
+ debug_output (_f ("Load lily.scm: %.2f seconds", timer.read ()));
}
void
Index: lily/main.cc
diff --git a/lily/main.cc b/lily/main.cc
index
bc86143a4781d58a86077132a920464091cb88cc..60b5738265e6d9a41f9ad2dcfecf887c823de01c
100644
--- a/lily/main.cc
+++ b/lily/main.cc
@@ -515,6 +515,7 @@ main_with_guile (void *, int, char **)
// SCM result = scm_call_1 (
// scm_variable_ref (call_with_error_handling),
// scm_call_1 (ly_lily_module_constant
("lilypond-main"), files));
+
Lily::lilypond_main (files);
/* Unreachable. */
@@ -743,9 +744,6 @@ setup_guile_gc_env ()
"104857600", overwrite);
}
-#if (GUILEV2)
-extern unsigned long GC_free_space_divisor;
-#endif
void
setup_guile_v2_env ()
@@ -763,7 +761,6 @@ setup_guile_v2_env ()
*/
sane_putenv("XDG_CACHE_HOME",
lilypond_datadir, true);
- GC_free_space_divisor = 1;
}
void
@@ -773,10 +770,9 @@ setup_guile_env ()
*/
{
+ setup_guile_gc_env (); // configure garbage collector
#if (GUILEV2)
setup_guile_v2_env (); // configure Guile V2 behaviour
-#else
- setup_guile_gc_env (); // configure garbage collector
#endif
}