lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Avoid Scheme-computed Skyline_pair values to get collected before us


From: k-ohara5a5a
Subject: Re: Avoid Scheme-computed Skyline_pair values to get collected before use (issue 12708048)
Date: Mon, 12 Aug 2013 05:50:10 +0000

On 2013/08/11 21:07:03, dak wrote:

It's conceivable that this change helped,
though there don't seem to be a lot of opportunities
for garbage collection between return of the SCM
value and use of the Skyline_pair.

There is ample opportunity for garbage generation and garbage
collection.  The call to maybe_pure_coordinate() estimates positions for
everything in the score, which causes a lot of computation and memory
use.

Adding the two tracer printf()s below, I see a SCM object holding the
skyline for the "Presto" is returned, then two hundred twenty three
other skylines are created, side-positioned, and discarded, then the
pointer into the skyline for the "Presto" is accessed.


https://codereview.appspot.com/12708048/diff/1/lily/side-position-interface.cc
File lily/side-position-interface.cc (right):

https://codereview.appspot.com/12708048/diff/1/lily/side-position-interface.cc#newcode216
lily/side-position-interface.cc:216: Skyline my_dim;
if (pure)
  printf("Storing pointer to skyline of a %s\n", me->name().c_str());

https://codereview.appspot.com/12708048/diff/1/lily/side-position-interface.cc#newcode238
lily/side-position-interface.cc:238: : me->get_parent
(Y_AXIS)->maybe_pure_coordinate (common[Y_AXIS], Y_AXIS, pure, start,
end);
if (pure)
  printf("Accessing pointer to skyline of a %s\n", me->name().c_str());

https://codereview.appspot.com/12708048/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]