From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.bugs Subject: bug#233: Analysis of redisplay performance on Windows Date: Fri, 25 Jul 2008 02:52:52 +0200 Message-ID: <488923E4.2040701@gmail.com> References: <48891CC4.4030508@gnu.org> Reply-To: "Lennart Borgman \(gmail\)" , 233@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1216948131 24765 80.91.229.12 (25 Jul 2008 01:08:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Jul 2008 01:08:51 +0000 (UTC) To: Jason Rumney , 233@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 25 03:09:40 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KMBoO-00011R-7e for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Jul 2008 03:09:37 +0200 Original-Received: from localhost ([127.0.0.1]:55408 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KMBnT-0002FK-7p for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Jul 2008 21:08:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KMBmL-0001Wo-QZ for bug-gnu-emacs@gnu.org; Thu, 24 Jul 2008 21:07:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KMBmH-0001SB-Nl for bug-gnu-emacs@gnu.org; Thu, 24 Jul 2008 21:07:29 -0400 Original-Received: from [199.232.76.173] (port=58000 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KMBmH-0001Rx-Fu for bug-gnu-emacs@gnu.org; Thu, 24 Jul 2008 21:07:25 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:60653) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KMBmG-0007dh-13 for bug-gnu-emacs@gnu.org; Thu, 24 Jul 2008 21:07:25 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m6P17J76010454; Thu, 24 Jul 2008 18:07:19 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m6P1035O007446; Thu, 24 Jul 2008 18:00:03 -0700 X-Loop: don@donarmstrong.com Resent-From: "Lennart Borgman (gmail)" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 25 Jul 2008 01:00:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 233 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 233-submit@emacsbugs.donarmstrong.com id=B233.12169471876226 (code B ref 233); Fri, 25 Jul 2008 01:00:03 +0000 Original-Received: (at 233) by emacsbugs.donarmstrong.com; 25 Jul 2008 00:53:07 +0000 Original-Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m6P0r4gV006220 for <233@emacsbugs.donarmstrong.com>; Thu, 24 Jul 2008 17:53:05 -0700 Original-Received: from c83-254-151-176.bredband.comhem.se ([83.254.151.176]:64323 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1KMBYN-0001Hl-3y; Fri, 25 Jul 2008 02:53:03 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 In-Reply-To: <48891CC4.4030508@gnu.org> X-Antivirus: avast! (VPS 080724-1, 2008-07-24), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.151.176 X-ACL-Warn: Too high rate of unknown addresses received from you X-Scan-Result: No virus found in message 1KMBYN-0001Hl-3y. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1KMBYN-0001Hl-3y 8e95fbe581bf897a0ed5e0773ec1e9ab X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Thu, 24 Jul 2008 21:07:29 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:18841 Archived-At: Jason Rumney wrote: > 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). Is this handled differently on GNU/Linux?