From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.devel Subject: Re: Analysis of redisplay performance on Windows Date: Sun, 27 Jul 2008 22:53:47 +0100 Message-ID: <488CEE6B.6020600@gnu.org> References: <87od4kuis1.fsf@stupidchicken.com> <488C45FF.2040509@gnu.org> <87tzebnizu.fsf@stupidchicken.com> <488CE8F6.5080001@gnu.org> <87iqurhupv.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1217195658 23272 80.91.229.12 (27 Jul 2008 21:54:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Jul 2008 21:54:18 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 27 23:55:07 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 1KNECo-0002qS-Bz for ged-emacs-devel@m.gmane.org; Sun, 27 Jul 2008 23:55:06 +0200 Original-Received: from localhost ([127.0.0.1]:45205 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KNEBu-00063t-B5 for ged-emacs-devel@m.gmane.org; Sun, 27 Jul 2008 17:54:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KNEBp-00063a-CN for emacs-devel@gnu.org; Sun, 27 Jul 2008 17:54:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KNEBn-00063G-V3 for emacs-devel@gnu.org; Sun, 27 Jul 2008 17:54:05 -0400 Original-Received: from [199.232.76.173] (port=50817 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KNEBn-00063D-O0 for emacs-devel@gnu.org; Sun, 27 Jul 2008 17:54:03 -0400 Original-Received: from mk-outboundfilter-5.mail.uk.tiscali.com ([212.74.114.1]:13764) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KNEBn-0007MM-P4 for emacs-devel@gnu.org; Sun, 27 Jul 2008 17:54:03 -0400 Original-X-Trace: 62440214/mk-outboundfilter-5.mail.uk.tiscali.com/F2S/$F2S-ACCEPTED/f2s-freedom2Surf-customers/83.67.23.108 X-SBRS: None X-RemoteIP: 83.67.23.108 X-IP-MAIL-FROM: jasonr@gnu.org X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiEFANCLjEhTQxds/2dsb2JhbACBW4k8oV4 X-IronPort-AV: E=Sophos;i="4.31,261,1215385200"; d="scan'208";a="62440214" X-IP-Direction: IN Original-Received: from i-83-67-23-108.freedom2surf.net (HELO wanchan.jasonrumney.net) ([83.67.23.108]) by smtp.f2s.tiscali.co.uk with ESMTP; 27 Jul 2008 22:54:02 +0100 Original-Received: from [192.168.249.27] (chiko.jasonrumney.net [192.168.249.27]) by wanchan.jasonrumney.net (Postfix) with ESMTP id B60AC1B7; Sun, 27 Jul 2008 22:54:25 +0100 (BST) User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: <87iqurhupv.fsf@stupidchicken.com> X-Enigmail-Version: 0.95.6 OpenPGP: id=8086879D X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:101604 Archived-At: Chong Yidong wrote: > Jason Rumney writes: > What you wrote seems to imply that left_overwritten and > right_overwritten aren't really the problem; they have a performance > impact simply because they cause more glyphs to be drawn (i.e., for > redrawing overwritten glyphs). But the ultimate problem is that drawing > glyphs is a much slower operation, compared to GNU/Linux. The question > is, what's the reason for this slowness, and can we fix it? One difference between Emacs 22 and 23 is that we compute glyph indexes properly in Emacs 23, while on 22 we use unicode code points. Since we call font->encode_char once per character rather than for a whole run, the overhead of selecting fonts into the GC is multiplied. As I suggested in my earlier email, new functions in the font backend interface to select a font for working with and releasing it when done, would help, as we could then skip doing this in functions like encode_char and text_extents.