[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lilypond-auto] Issue 2264 in lilypond: Line breaking can be slow wi
From: |
lilypond |
Subject: |
Re: [Lilypond-auto] Issue 2264 in lilypond: Line breaking can be slow with very wide paper |
Date: |
Tue, 21 Jul 2015 18:05:04 +0000 |
Comment #3 on issue 2264 by address@hidden: Line breaking can be slow with
very wide paper
https://code.google.com/p/lilypond/issues/detail?id=2264
Profiling the 1000 note case delivers the following stats:
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls s/call s/call name
80.76 226.28 226.28 3977760646 0.00 0.00
Spring::set_blocking_force(double)
18.26 277.44 51.16 39480992 0.00 0.00
Simple_spacer::add_rod(int, int, double)
0.29 278.24 0.80 1 0.80 278.88
get_line_forces(std::vector<Grob*, std::allocator<Grob*> > const&, double,
double, bool)
0.12 278.59 0.35 26368758 0.00 0.00
Spring::length(double) const
0.12 278.92 0.33 304816 0.00 0.00 std::vector<Spring,
std::allocator<Spring>
::_M_insert_aux(__gnu_cxx::__normal_iterator<Spring*, std::vector<Spring,
std::allocator<Spring> > >, Spring const&)
0.07 279.13 0.21 10692510 0.00 0.00
Paper_column::get_rank(Grob const*)
[...]
Call graph (explanation follows)
granularity: each sample hit covers 4 byte(s) for 0.00% of 280.18 seconds
index % time self children called name
<spontaneous>
[1] 99.8 0.00 279.55
ly_optimal_breaking(scm_unused_struct*) [1]
0.00 279.35 1/1
Optimal_page_breaking::Optimal_page_breaking(Paper_book*) [3]
0.00 0.20 1/1
Optimal_page_breaking::solve() [22]
0.00 0.01 1/1
Page_breaking::~Page_breaking() [163]
0.00 0.00 1/1
Optimal_page_breaking::~Optimal_page_breaking() [3246]
-----------------------------------------------
0.00 279.35 1/1
Optimal_page_breaking::Optimal_page_breaking(Paper_book*) [3]
[2] 99.7 0.00 279.35 1
Page_breaking::Page_breaking(Paper_book*, bool (*)(Grob*), bool (*)(Prob*))
[2]
0.00 279.35 1/1
Page_breaking::find_chunks_and_breaks(bool (*)(Grob*), bool (*)(Prob*)) [4]
0.00 0.00 1/1
Page_layout_problem::get_footnote_separator_stencil(Output_def*) [453]
0.00 0.00 5/675010
robust_scm2double(scm_unused_struct*, double) [87]
0.00 0.00 11/4196
Output_def::c_variable(std::string const&) const [755]
0.00 0.00 11/4140
note_property_access(scm_unused_struct**, scm_unused_struct*) [757]
0.00 0.00 4/89937
robust_scm2int(scm_unused_struct*, int) [596]
0.00 0.00 2/319100
to_boolean(scm_unused_struct*) [567]
0.00 0.00 1/4271 Box::is_empty() const [753]
0.00 0.00 1/4310 Stencil::is_empty() const
[750]
0.00 0.00 1/1
Page_breaking::create_system_list() [3126]
0.00 0.00 1/5167 Stencil::extent(Axis)
const [739]
0.00 0.00 1/38841
Interval_t<double>::length() const [628]
-----------------------------------------------
0.00 279.35 1/1
ly_optimal_breaking(scm_unused_struct*) [1]
[3] 99.7 0.00 279.35 1
Optimal_page_breaking::Optimal_page_breaking(Paper_book*) [3]
0.00 279.35 1/1
Page_breaking::Page_breaking(Paper_book*, bool (*)(Grob*), bool (*)(Prob*))
[2]
-----------------------------------------------
0.00 279.35 1/1
Page_breaking::Page_breaking(Paper_book*, bool (*)(Grob*), bool (*)(Prob*))
[2]
[4] 99.7 0.00 279.35 1
Page_breaking::find_chunks_and_breaks(bool (*)(Grob*), bool (*)(Prob*)) [4]
0.00 279.33 1/1
Constrained_breaking::Constrained_breaking(Paper_score*,
std::vector<unsigned int, std::allocator<unsigned int> > const&) [6]
0.00 0.01 1/1
std::vector<Constrained_breaking, std::allocator<Constrained_breaking>
::_M_insert_aux(__gnu_cxx::__normal_iterator<Constrained_breaking*,
std::vector<Co
nstrained_breaking, std::allocator<Constrained_breaking> > >,
Constrained_breaking const&) [142]
0.01 0.00 1/2
Constrained_breaking::~Constrained_breaking() [137]
0.00 0.00 1/5 System::used_columns()
const [236]
0.00 0.00 1251/1914560
Grob::internal_get_property(scm_unused_struct*) const [32]
0.00 0.00 2/2
std::vector<Break_position, std::allocator<Break_position>
::push_back(Break_position const&) [1565]
0.00 0.00 2/46
std::vector<Break_position, std::allocator<Break_position>
::_M_insert_aux(__gnu_cxx::__normal_iterator<Break_position*,
std::vector<Break_position, std:
:allocator<Break_position> > >, Break_position const&) [1243]
0.00 0.00 1/41147 Paper_score::root_system()
const [623]
0.00 0.00 1/17313 Paper_score::layout()
const [656]
0.00 0.00 1/4196
Output_def::c_variable(std::string const&) const [755]
0.00 0.00 1/90 std::vector<unsigned int,
std::allocator<unsigned int>
::_M_insert_aux(__gnu_cxx::__normal_iterator<unsigned int*,
std::vector<unsigned int, std::allocator<unsigned int> > >, unsigned int
const&) [1198]
0.00 0.00 1/4140
note_property_access(scm_unused_struct**, scm_unused_struct*) [757]
-----------------------------------------------
0.00 279.33 1/1
Constrained_breaking::Constrained_breaking(Paper_score*,
std::vector<unsigned int, std::allocator<unsigned int> > const&) [6]
[5] 99.7 0.00 279.33 1
Constrained_breaking::initialize() [5]
0.80 278.08 1/1
get_line_forces(std::vector<Grob*, std::allocator<Grob*> > const&, double,
double, bool) [7]
0.01 0.43 31375/31375
Constrained_breaking::fill_line_details(Line_details*, unsigned int,
unsigned int) [10]
0.01 0.00 1/1 std::vector<Line_details,
std::allocator<Line_details>
::_M_fill_insert(__gnu_cxx::__normal_iterator<Line_details*,
std::vector<Line_details, std::allocator<Line_details> > >, unsigned int,
Line_details const&) [141]
0.00 0.00 1/20 std::vector<Line_details,
std::allocator<Line_details> >::operator=(std::vector<Line_details,
std::allocator<Line_details> > const&) [57]
0.00 0.00 1/5 System::used_columns()
const [236]
0.00 0.00 11/8213
Page_layout_problem::read_spacing_spec(scm_unused_struct*, double*,
scm_unused_struct*) [701]
0.00 0.00 6/4196
Output_def::c_variable(std::string const&) const [755]
0.00 0.00 5/17313 Paper_score::layout()
const [656]
0.00 0.00 4/4 void
std::__adjust_heap<__gnu_cxx::__normal_iterator<double*,
std::vector<double, std::allocator<double> > >, int, double,
__gnu_cxx::__ops::_Iter_less_iter>(__gnu_cxx::__normal_iterator<double*,
std::vector<double, std::allocator<double> > >, int, int, double,
__gnu_cxx::__ops::_Iter_less_iter) [1468]
0.00 0.00 3/38841
Interval_t<double>::length() const [628]
0.00 0.00 2/319100
to_boolean(scm_unused_struct*) [567]
0.00 0.00 2/7
line_dimensions_int(Output_def*, int) [1386]
0.00 0.00 1/63252
Paper_score::get_break_indices() const [606]
0.00 0.00 1/73 std::vector<unsigned int,
std::allocator<unsigned int> >::operator=(std::vector<unsigned int,
std::allocator<unsigned int> > const&) [1209]
0.00 0.00 1/41147 Paper_score::root_system()
const [623]
0.00 0.00 1/11012 std::vector<Grob*,
std::allocator<Grob*> >::operator=(std::vector<Grob*, std::allocator<Grob*>
const&) [683]
0.00 0.00 1/1
Line_details::Line_details() [3109]
0.00 0.00 1/452
Line_details::Line_details(Line_details const&) [1109]
0.00 0.00 1/90 std::vector<unsigned int,
std::allocator<unsigned int>
::_M_insert_aux(__gnu_cxx::__normal_iterator<unsigned int*,
std::vector<unsigned int, std::allocator<unsigned int> > >, unsigned int
const&) [1198]
0.00 0.00 1/1
std::vector<Matrix<Constrained_break_node,
std::allocator<Constrained_break_node> >,
std::allocator<Matrix<Constrained_break_node,
std::allocator<Constrained_break_node> > >
::_M_fill_insert(__gnu_cxx::__normal_iterator<Matrix<Constrained_break_node,
std::allocator<Constrained_break_node> >*,
std::vector<Matrix<Constrained_break_node,
std::allocator<Constrained_break_node> >,
std::allocator<Matrix<Constrained_break_node,
std::allocator<Constrained_break_node> > > > >, unsigned int,
Matrix<Constrained_break_node, std::allocator<Constrained_break_node> >
const&) [3735]
-----------------------------------------------
0.00 279.33 1/1
Page_breaking::find_chunks_and_breaks(bool (*)(Grob*), bool (*)(Prob*)) [4]
[6] 99.7 0.00 279.33 1
Constrained_breaking::Constrained_breaking(Paper_score*,
std::vector<unsigned int, std::allocator<unsigned int> > const&) [6]
0.00 279.33 1/1
Constrained_breaking::initialize() [5]
-----------------------------------------------
0.80 278.08 1/1
Constrained_breaking::initialize() [5]
[7] 99.5 0.80 278.08 1
get_line_forces(std::vector<Grob*, std::allocator<Grob*> > const&, double,
double, bool) [7]
51.15 226.22 39469750/39480992
Simple_spacer::add_rod(int, int, double) [8]
0.33 0.00 303016/304816 std::vector<Spring,
std::allocator<Spring>
::_M_insert_aux(__gnu_cxx::__normal_iterator<Spring*, std::vector<Spring,
std::allocator<Spring> > >, Spring const&) [17]
0.04 0.17 31375/31380
Simple_spacer::expand_line() [20]
0.17 0.00 13177500/26368758 Spring::length(double)
const [14]
0.00 0.00 1499/5249
get_column_description(std::vector<Grob*, std::allocator<Grob*> > const&,
unsigned int, bool) [221]
0.00 0.00 1249/17507
Paper_column::is_breakable(Grob*) [246]
0.00 0.00 1251/677790
Grob::internal_get_object(scm_unused_struct*) const [52]
0.00 0.00 1/756 std::vector<double,
std::allocator<double>
::_M_fill_insert(__gnu_cxx::__normal_iterator<double*, std::vector<double,
std::allocator<double> > >, unsigned int, double const&) [136]
0.00 0.00 500/500
std::vector<Rod_description, std::allocator<Rod_description>
::operator=(std::vector<Rod_description, std::allocator<Rod_description> >
const&) [1106]
0.00 0.00 12/33114 std::vector<Grob*,
std::allocator<Grob*> >::_M_insert_aux(__gnu_cxx::__normal_iterator<Grob**,
std::vector<Grob*, std::allocator<Grob*> > >, Grob* const&) [631]
0.00 0.00 12/58
std::vector<Column_description, std::allocator<Column_description>
::_M_insert_aux(__gnu_cxx::__normal_iterator<Column_description*,
std::vector<Column_description, std::allocator<Column_description> > >,
Column_description const&) [1238]
0.00 0.00 9/90 std::vector<unsigned int,
std::allocator<unsigned int>
::_M_insert_aux(__gnu_cxx::__normal_iterator<unsigned int*,
std::vector<unsigned int, std::allocator<unsigned int> > >, unsigned int
const&) [1198]
0.00 0.00 2/12250 Spring::Spring() [678]
0.00 0.00 1/1561678
Interval_t<double>::set_empty() [561]
-----------------------------------------------
0.01 0.06 11242/39480992
get_line_configuration(std::vector<Grob*, std::allocator<Grob*> > const&,
double, double, bool) [34]
51.15 226.22 39469750/39480992
get_line_forces(std::vector<Grob*, std::allocator<Grob*> > const&, double,
double, bool) [7]
[8] 99.0 51.16 226.28 39480992 Simple_spacer::add_rod(int,
int, double) [8]
226.28 0.00 3977760646/3977760646
Spring::set_blocking_force(double) [9]
-----------------------------------------------
226.28 0.00 3977760646/3977760646
Simple_spacer::add_rod(int, int, double) [8]
[9] 80.8 226.28 0.00 3977760646
Spring::set_blocking_force(double) [9]
-----------------------------------------------
0.01 0.43 31375/31375
Constrained_breaking::initialize() [5]
[10] 0.2 0.01 0.43 31375
Constrained_breaking::fill_line_details(Line_details*, unsigned int,
unsigned int) [10]
0.00 0.17 31375/31375
System::begin_of_line_pure_height(unsigned int, unsigned int) [26]
0.00 0.17 31375/31375
System::rest_of_line_pure_height(unsigned int, unsigned int) [25]
0.00 0.07 31375/31375
System::pure_refpoint_extent(unsigned int, unsigned int) [39]
0.01 0.00 188250/1914560
Grob::internal_get_property(scm_unused_struct*) const [32]
0.00 0.00 94125/675010
robust_scm2double(scm_unused_struct*, double) [87]
0.00 0.00 31375/31375
System::get_footnote_heights_in_range(unsigned int, unsigned int) [218]
0.00 0.00 31375/31375
System::get_in_note_heights_in_range(unsigned int, unsigned int) [217]
0.00 0.00 62750/10692510
Paper_column::get_rank(Grob const*) [21]
0.00 0.00 62750/5550550
Interval_t<double>::unite(Interval_t<double>) [31]
0.00 0.00 94125/1561678
Interval_t<double>::set_empty() [561]
0.00 0.00 62750/213018 std::vector<double,
std::allocator<double> >::operator=(std::vector<double,
std::allocator<double> > const&) [572]
0.00 0.00 31375/41147 Paper_score::root_system()
const [623]
0.00 0.00 31375/38841
Interval_t<double>::length() const [628]
and the rest is unimportant.
Here is the explanation for the call graph:
This table describes the call tree of the program, and was sorted by
the total amount of time spent in each function and its children.
Each entry in this table consists of several lines. The line with the
index number at the left hand margin lists the current function.
The lines above it list the functions that called this function,
and the lines below it list the functions this one called.
This line lists:
index A unique number given to each element of the table.
Index numbers are sorted numerically.
The index number is printed next to every function name so
it is easier to look up where the function is in the table.
% time This is the percentage of the `total' time that was spent
in this function and its children. Note that due to
different viewpoints, functions excluded by options, etc,
these numbers will NOT add up to 100%.
self This is the total amount of time spent in this function.
children This is the total amount of time propagated into this
function by its children.
called This is the number of times the function was called.
If the function called itself recursively, the number
only includes non-recursive calls, and is followed by
a `+' and the number of recursive calls.
name The name of the current function. The index number is
printed after it. If the function is a member of a
cycle, the cycle number is printed between the
function's name and the index number.
For the function's parents, the fields have the following meanings:
self This is the amount of time that was propagated directly
from the function into this parent.
children This is the amount of time that was propagated from
the function's children into this parent.
called This is the number of times this parent called the
function `/' the total number of times the function
was called. Recursive calls to the function are not
included in the number after the `/'.
name This is the name of the parent. The parent's index
number is printed after it. If the parent is a
member of a cycle, the cycle number is printed between
the name and the index number.
If the parents of the function cannot be determined, the word
`<spontaneous>' is printed in the `name' field, and all the other
fields are blank.
For the function's children, the fields have the following meanings:
self This is the amount of time that was propagated directly
from the child into the function.
children This is the amount of time that was propagated from the
child's children to the function.
called This is the number of times the function called
this child `/' the total number of times the child
was called. Recursive calls by the child are not
listed in the number after the `/'.
name This is the name of the child. The child's index
number is printed after it. If the child is a
member of a cycle, the cycle number is printed
between the name and the index number.
If there are any cycles (circles) in the call graph, there is an
entry for the cycle-as-a-whole. This entry shows who called the
cycle (as parents) and the members of the cycle (as children.)
The `+' recursive calls entry shows the number of function calls that
were internal to the cycle, and the calls entry for each member shows,
for that member, how many times it was called from other members of
the cycle.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings