glyph extents



Hey,
In a follow up of my profiling experiments[1] I tried to figure out why pango_cairo_fc_font_get_glyph_extents was appearing so high in the charts. I'm using the timetext[2] program, which exposes a 67 (including whitespace) character long string with 22 different characters as much as possible in one minute. One I checked that the cache was actually working I modified the function to just compute the extents of the first character received and then use that value all the time (yeah, weird experiments are fun). I hoped this would make the function drop in the profile, but it did nothing! Puzzled, I decided to count how many times was this function being called. As it turns out, for 292 expose events of a 67 character long GtkLabel we are calling it 56,191 times. That's almost 3 times per character per expose event, 4 if you ignore whitespace. Does it sound right?

[1]http://lists.freedesktop.org/archives/cairo/2006-November/008628.html
[2]http://folks.o-hand.com/jorn/pango-benchmarks/timetext.c


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