From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Analysis of redisplay performance on Windows Date: Sun, 27 Jul 2008 16:56:53 -0400 Message-ID: <87tzebnizu.fsf@stupidchicken.com> References: <87od4kuis1.fsf@stupidchicken.com> <488C45FF.2040509@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1217192231 14603 80.91.229.12 (27 Jul 2008 20:57:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Jul 2008 20:57:11 +0000 (UTC) Cc: emacs-devel@gnu.org To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 27 22:58:00 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KNDJY-0006l0-Ei for ged-emacs-devel@m.gmane.org; Sun, 27 Jul 2008 22:58:00 +0200 Original-Received: from localhost ([127.0.0.1]:53480 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KNDIe-0001KX-IV for ged-emacs-devel@m.gmane.org; Sun, 27 Jul 2008 16:57:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KNDIa-0001K4-5B for emacs-devel@gnu.org; Sun, 27 Jul 2008 16:57:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KNDIY-0001Jg-GG for emacs-devel@gnu.org; Sun, 27 Jul 2008 16:56:59 -0400 Original-Received: from [199.232.76.173] (port=49741 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KNDIY-0001Jd-D7 for emacs-devel@gnu.org; Sun, 27 Jul 2008 16:56:58 -0400 Original-Received: from c-24-63-201-57.hsd1.ma.comcast.net ([24.63.201.57]:20063 helo=furry) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KNDIV-0000S4-LA; Sun, 27 Jul 2008 16:56:55 -0400 Original-Received: by furry (Postfix, from userid 1000) id 864F4C059; Sun, 27 Jul 2008 16:56:53 -0400 (EDT) In-Reply-To: <488C45FF.2040509@gnu.org> (Jason Rumney's message of "Sun, 27 Jul 2008 10:55:11 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:101596 Archived-At: Jason Rumney writes: > That is why I suspect there may be a problem with the setting of > row->contains_overlapping_glyphs_p on Windows. We avoid calling those > functions if that variable is not set. It may also be much more > expensive to look up the glyph index points in Windows, that is the case > for obtaining text extents, so it wouldn't surprise me. > > Another factor is that we do this all one character at a time, and each > time on Windows we select the font into the current GC, then reselect > the previously set font. This operation is also expensive, so it would > help to have functions in the font backend interface for selecting and > deselecting fonts. I already tried using prepare_face and done_face for > this, but the calls overlap - ie we prepare a second face without > calling done_face for the first. Could you verify that setting the overlaps argument unconditionally to 1 in draw_glyphs indeed removes the performance problem? If so, we can work around this.