unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: Analysis of redisplay performance on Windows
@ 2008-07-27  3:07 Chong Yidong
  2008-07-27  9:55 ` Jason Rumney
  0 siblings, 1 reply; 14+ messages in thread
From: Chong Yidong @ 2008-07-27  3:07 UTC (permalink / raw)
  To: Jason Rumney; +Cc: emacs-devel

Jason Rumney <jasonr@gnu.org> writes:

> The redisplay performance problems on Windows seem to be mostly caused
> by the left_overwriting and right_overwriting functions. These functions
> analyse all glyphs, one by one, before and after (respectively) the
> current glyph string on the same row to see if the glyphs overlap the
> current glyph string.
>
> To determine the overlap for each glyph, it is necessary to encode it
> into a glyph code point in the font used to display it, then measure its
> text extents.  Even with caching of the text extents, the Windows code
> is still especially slow here because of the encoding to glyph code points.
>
> Currently we cache glyph code points at the glyph_string level. Perhaps
> caching them at the glyph row level would help, as we could then reuse
> them after we have finished with the glyph string. Alternatively we
> could keep all the glyph strings for the row until we are finished so we
> could use glyph code points and other information from there. This might
> reduce the number of iterations we need to find the left and right
> overwriting glyphs, since we can check the glyph strings for overlaps
> first, and only check the glyphs inside glyph strings that overlap.
>
> There may also be a problem with the setting of
> row->contains_overlapping_glyphs_p on Windows. The above functions
> should only be called when that is set, but after inserting debugging
> code I can see them being called frequently even when using fonts that
> contain no overlapping glyphs (confirmed by further debugging code in
> w32font_text_metrics).

Thanks for looking into this, Jason.

But I don't understand why the problem of left_overwriting and
right_overwriting, if that's indeed the culprit, would be specific to
Windows.  These functions are called in the platform-independent
redisplay code.  Or is it much more expensive to look up glyph code
points in fonts on Windows, compared to GNU/Linux?




^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-07-30 21:51 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-27  3:07 Analysis of redisplay performance on Windows Chong Yidong
2008-07-27  9:55 ` Jason Rumney
2008-07-27 20:56   ` Chong Yidong
2008-07-27 21:30     ` Jason Rumney
2008-07-27 21:40       ` Chong Yidong
2008-07-27 21:53         ` Jason Rumney
2008-07-28  1:18           ` Chong Yidong
2008-07-28  3:06             ` Adrian Robert
2008-07-28  5:03               ` Chong Yidong
2008-07-28  7:04             ` Jason Rumney
2008-07-28  2:11           ` Kevin Yu
2008-07-28  4:24           ` YAMAMOTO Mitsuharu
2008-07-28  9:48             ` YAMAMOTO Mitsuharu
2008-07-30 21:51               ` Jason Rumney

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).