lilypond-devel
[Top][All Lists]
Advanced

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

Re: Gets vertical skylines from grob stencils (issue 5626052)


From: address@hidden
Subject: Re: Gets vertical skylines from grob stencils (issue 5626052)
Date: Mon, 6 Feb 2012 21:06:53 +0100

On Feb 6, 2012, at 8:37 PM, David Kastrup wrote:

> It is rare that I encounter an algorithm that I can't speed up by a
> factor of at least 10 once I seriously try (and that does not mean
> coding in assembly or similar bad deals).  

Have at it!

To all interested parties, this work is now up on:

dev/skylines

A few gotchyas:

-) the code in axis-group-interface.cc add_grobs_of_one_priority has lots of if 
/ else that could likely be made easier to read.  not much of a speed up, but 
would help legibility.  basically, they're all flags for using skylines or not. 
 it can easily be divided into two different functions that are accessed as the 
result of one if/else statement.
-) in axis-group-interface.cc, anytime you use a skyline to do the job of a 
box, try it with and without a copy of the skyline.  moving the original around 
may screw things up if the skyline is reused.
-) if i had a guess as to the two places this could be sped up, its:
----) caching glyph box data in a scm file when the fonts are built.  all the 
code is there in stencil-integral.scm - it'd just need to be called and written 
somewhere during the build process.  code could be added here to remove boxes 
that will never be part of a skyline (inside the white space of the treble 
clef, for example)
----) speeding up skylines. specifically:
--------) the constructor
--------) merge
--------) distance
--------) touching_point
--------) height

Good luck!

Cheers,
MS


reply via email to

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