Re: --gtk-unbuffered



On Tue, 27 Feb 2001, Alexander Larsson wrote:

> On 27 Feb 2001, Sven Neumann wrote:
>
> > Owen Taylor <otaylor redhat com> writes:
> >
> > >  - Your timings are extrodinarily higher than what we see on
> > >    X11; this indicates that the problem lies, not in what
> > >    GtkLabel is doing, but most likely in the backend Win32
> > >    is using for Pango.
> >
> > I just ran the same tests on our GDK backend which is using the
> > FreeType2 Pango backend and the timings are slightly slower than
> > the ones for X11 but far from being as bad as the ones Hans
> > obtained for the Win32 backend. So there must indeed be a problem
> > in the Win32 backend.
>
> I can tell you, that before I changed the FreeType2 Pango backend to cache
> extents it was god-awfully slow. This might be the same cause. I'll
> take a quick look at the win32 backend.
>
> Btw. What gdk backend is this?

* alex looks at the win32 pango code.
* alex screams in pain.

Eeeeeeeek. This is bad, very bad.

Stuff like this:
  /* Draw character into our bitmap; compare with the bitmap for
   * the default character. If they are identical, this character
   * does not exist in the font.
   */
  FillRect (info->buf_hdc, &info->buf_rect, white_brush);
  TextOutW (info->buf_hdc, info->buf_x, info->buf_y, &wc, 1);

  return (memcmp (info->buf, info->default_char_buf, info->buf_size) != 0);

And a lot more is run for *each* get_glyph_extents call. This is a major
performance problem I can tell you.

Someone *please* take a look at
pangoft2.c:pango_ft2_font_get_glyph_extents() and port the glyph extents
caching to pangowin32.c:pango_win32_font_get_glyph_extents(). It should be
very simple, and result in a MAJOR speedup.

/ Alex








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