I have dug deeper and found that indeed FcFontSort seems to be the culprit. This function is called twice for each call to pango_layout_line_get_extents and each call costs about 17 ms.
This accounts for most of the time. I have also looked at greeter_session_init which is costing me 150 ms. 17 ms is due FcFontSort and 120 ms is due to FcInit. Padraig On Tue, 2006-01-10 at 09:02 +0000, Padraig O'Briain wrote: > I am using DTrace scripts which I attach and the output which I also > attach. > > You will notice, see lines 29, 59, 103, 167, 231, that the calls to > pango_layout_line_get_extents which are expensive, costing about 40 ms > each, are the ones which open a font file. > > I have not yet drilled down to see where the time is being spent or what > the strings are. > > What struck me was that we open Vera.ttf twice and VeraBd.ttf 3 times. > If we opened each once it looks like we should save 120 ms. > > I noticed in the news for pango 1.11.1 that you referred to caching > optimizations. I was wondering these would cause these files to opened > only once. > > Padraig > > On Mon, 2006-01-09 at 12:42 -0600, Federico Mena Quintero wrote: > > On Mon, 2006-01-09 at 16:51 +0000, Padraig O'Briain wrote: > > > > > I am using pango 1.10.1 and am looking at the CPU being used by > > > gdmgreeter. > > > > > > I have found that 25% of the CPU (about 200ms on my system) is used in 5 > > > calls to pango_layout_line_get_extents (called from > > > gnome_canvas_text_set_property). Each call is associated with opening a > > > TrueType font, two for Vera.ttf and three for VeraBd.ttf. > > > > > > Do the improvements you have made in pango 1.11.1 offer me hope that > > > this will be speeded up? > > > > Do you have stack traces of where those calls happen? Do you know which > > strings are inside the corresponding PangoLayouts? > > > > Do you have something like a sysprof log? > > > > I wonder if the time is being spent directly inside Pango, or in > > fontconfig/Xft loading fonts. > > > > See bug #319483; we spend quite a bit of time in FcFontSort() when using > > a font description that hasn't been used before. > > > > Federico > > > _______________________________________________ > Performance-list mailing list > [email protected] > http://mail.gnome.org/mailman/listinfo/performance-list _______________________________________________ Performance-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/performance-list
