lilyp...@googlecode.com writes: > By the way, the excessive memory usage was in > Page_breaking::line_divisions_rec. This function theoretically uses > memory which is exponential in the number of systems, but it should > never be an issue because of the way the function is used; the > lower_bound and upper_bound arguments keep memory usage down to > something linear in the number of systems. The problem was that I > changed the way that systems were counted internally in the page > breaker (before, system_count() counted systems, titles and markups, > but I changed it to only count systems). But I didn't make the change > in all of the places where it was required, so the system_count > argument to line_divisions_rec got out of sync with the lower_bound > and upper_bound arguments, causing exponential memory usage (but only > when there are enough titles and markups to make things sufficiently > out of sync).
I have not looked at the code, but this sounds like an accident waiting to happen again and/or like being hard to read. Would there be a feasible way to reduce the place where the actual updating is being done to _one_ location (like an inline private member function or whatever else) instead of needing to cater with continuing having to do maintain any further "change in all of the places where it was required"? -- David Kastrup _______________________________________________ bug-lilypond mailing list bug-lilypond@gnu.org http://lists.gnu.org/mailman/listinfo/bug-lilypond