On Tue, 10 Dec 2013 22:44:18 -0800, Keith OHara <k-ohara5...@oco.net> wrote:
After a brief look at the code, it looked like for each glyph being laid out there is one extra call of Open_type_font:: or Pango_font::name_to_index(), which is the function called by find_by_name() that caused the extra time with issue 1926.
I am happy to say that I was wrong here. Open_type_font:: and Pango_font::name_to_index() each call FT_Get_Name_Index(). Inserting print statements to trace those calls I find that FT_Get_Name_Index is called: 7 times for each character in a Tempo 5 times for each character in a Text Script ... 1 time for each notehead 5 times for each rest If I use boxes instead of glyph outlines for vertical-skylines: 0 times for each character in a Tempo (probably just uses the Unicode index) 0 times for each character in a Text Script ( " ) 1 time for each notehead 5 times for each rest So the outlines for each letter are re-built several times (through some path in the code that I have not yet found). Whether the expensive part is the FreeType function call, or joining about 60 boxes per character into the skyline for the word, there is a good chance that we can save both by building skylines once for each word. _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel