From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Jan_Dj=E4rv?= Newsgroups: gmane.emacs.devel Subject: Re: Display performance degradation Date: Thu, 17 Dec 2009 17:42:58 +0100 Message-ID: <4B2A5F92.9090008@swipnet.se> References: 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 1261068273 16042 80.91.229.12 (17 Dec 2009 16:44:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Dec 2009 16:44:33 +0000 (UTC) Cc: YAMAMOTO Mitsuharu , emacs-devel@gnu.org To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 17 17:44:25 2009 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 1NLJSP-0004kc-Ms for ged-emacs-devel@m.gmane.org; Thu, 17 Dec 2009 17:44:22 +0100 Original-Received: from localhost ([127.0.0.1]:35762 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLJSB-0006Nw-V3 for ged-emacs-devel@m.gmane.org; Thu, 17 Dec 2009 11:43:51 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NLJS5-0006NO-FO for emacs-devel@gnu.org; Thu, 17 Dec 2009 11:43:45 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLJS1-0006Mn-EJ for emacs-devel@gnu.org; Thu, 17 Dec 2009 11:43:45 -0500 Original-Received: from [199.232.76.173] (port=41126 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLJS1-0006Mk-2j for emacs-devel@gnu.org; Thu, 17 Dec 2009 11:43:41 -0500 Original-Received: from proxy2.bredband.net ([195.54.101.72]:62317) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NLJRg-0008Ss-De for emacs-devel@gnu.org; Thu, 17 Dec 2009 11:43:40 -0500 Original-Received: from ipb2.telenor.se (195.54.127.165) by proxy2.bredband.net (7.3.140.3) id 4AD3E1BC01CADC09 for emacs-devel@gnu.org; Thu, 17 Dec 2009 17:42:59 +0100 X-SMTPAUTH-B2: X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqRrAOvtKUtV4S1uPGdsb2JhbACBS4cgkCWCSAEBAQE3umWELQQ X-IronPort-AV: E=Sophos;i="4.47,414,1257116400"; d="scan'208";a="16917015" Original-Received: from c-6e2de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.110]) by ipb2.telenor.se with ESMTP; 17 Dec 2009 17:42:59 +0100 Original-Received: from [172.20.199.2] (gaffa [172.20.199.2]) by coolsville.localdomain (Postfix) with ESMTP id B1C517FA07B; Thu, 17 Dec 2009 17:42:58 +0100 (CET) User-Agent: Thunderbird 2.0.0.23 (X11/20090817) In-Reply-To: X-detected-operating-system: 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:118675 Archived-At: Kenichi Handa skrev: > In article , YAMAMOTO Mitsuharu writes: > >> I can observe significant display performance degradation on Emacs >> 23.1.90 compared with 23.1, especially when scrolling TUTORIAL.ja on a >> frame that uses the xft font backend. I also observe the increase of >> the total number of xftfont_draw calls, and a string in a single font >> and color, which was originally displayed by one call, is now >> unnecessarily divided into smaller units. > [...] >> + #if 0 >> + /* This doesn't work if you have changed hinting or any other parameter. >> + We need to make a new object in every case to be sure. */ >> for (objlist = AREF (entity, FONT_OBJLIST_INDEX); CONSP (objlist); >> objlist = XCDR (objlist)) >> if (! NILP (AREF (XCAR (objlist), FONT_TYPE_INDEX)) >> && XFONT_OBJECT (XCAR (objlist))->pixel_size == pixel_size) >> return XCAR (objlist); >> + #endif > > I didn't notice this change because I'm using X fonts > mainly. > > In article <4B29E046.8050107@swipnet.se>, "Jan D." writes: > >> The basic question is why is this called so much? > > If it is not known, the above code should not be commented out. > >> It is a fundamental >> flaw in Emacs that makes it hard to add new stuff without degrading >> performance. The core problem is that Emacs internally doesn't track >> what is changed. So it re-evaluates faces, fonts, menus, toolbars and >> so on, all the time before redisplay, and 99.99% of those times, nothing >> has changed. So to speed things up, we have various caches to check if >> things are the same as before. But these caches cause problems >> elsewhere. > > Those caches (including face-cache) are there because of the > current redisplay engine (and face handling). So, without > fixing it (in your word, a fundamental flaw), those caches > should not be disabled. > >> For example, if a new font is added or if /etc/font.conf is >> changed, Emacs must be restarted because caches prevents Emacs from >> noticing the change. > > The problem of extremely slow display is the bigger problem > than it. > How much is extremely, do you have figures? I haven't noticed any change, maybe it only manifests itself for certain locales. Jan D.