From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: ftx font driver [Re: Low redisplay performance (23 regression)] Date: Thu, 23 Apr 2009 20:22:10 +0900 Message-ID: References: <4870CC42-A08E-4BE9-B566-0F4DA7AB0B74@gmail.com> <873ac3arbf.fsf@cyd.mit.edu> <83r5zmhf2q.fsf@gnu.org> <83mya9hm0i.fsf@gnu.org> <873ac0aeoy.fsf@CPU107.opentrends.net> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1240485738 31300 80.91.229.12 (23 Apr 2009 11:22:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Apr 2009 11:22:18 +0000 (UTC) Cc: dcl441-bugs@yahoo.com, emacs-devel@gnu.org To: YAMAMOTO Mitsuharu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 23 13:23:37 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 1Lwx1e-0002GT-IH for ged-emacs-devel@m.gmane.org; Thu, 23 Apr 2009 13:23:30 +0200 Original-Received: from localhost ([127.0.0.1]:58400 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lwx0F-0002fy-BX for ged-emacs-devel@m.gmane.org; Thu, 23 Apr 2009 07:22:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lwx07-0002fS-Ey for emacs-devel@gnu.org; Thu, 23 Apr 2009 07:21:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lwx02-0002dv-Dk for emacs-devel@gnu.org; Thu, 23 Apr 2009 07:21:54 -0400 Original-Received: from [199.232.76.173] (port=48207 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lwx02-0002ds-A2 for emacs-devel@gnu.org; Thu, 23 Apr 2009 07:21:50 -0400 Original-Received: from mx1.aist.go.jp ([150.29.246.133]:39522) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lwx01-0004tQ-Jd for emacs-devel@gnu.org; Thu, 23 Apr 2009 07:21:50 -0400 Original-Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id n3NBLjQI012292; Thu, 23 Apr 2009 20:21:45 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp4.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id n3NBLjgP018757; Thu, 23 Apr 2009 20:21:45 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp4.aist.go.jp with ESMTP id n3NBLjTu005470; Thu, 23 Apr 2009 20:21:45 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1Lwx0M-0005uN-ER; Thu, 23 Apr 2009 20:22:10 +0900 In-reply-to: (message from YAMAMOTO Mitsuharu on Thu, 23 Apr 2009 16:31:44 +0900) X-detected-operating-system: by monty-python.gnu.org: Solaris 9 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:110427 Archived-At: In article , YAMAMOTO Mitsuharu writes: > > As ftx font driver is not used by default on any platforms, it is > > not tested well and I myself don't remember the code well. > There might be the case that the Xft library is not installed, does > not have a sufficient version, or not found by configure for some > reasons (e.g., PKG_CONFIG_PATH is not set appropriately). In such > cases, the ftx font driver is selected as a default. Of course, you > can reproduce such a situation with --without-xft. Ah, you are right. I should have written "usually" instead of "by default". > The result of time profiling using Shark.app indicates that > FT_Load_Glyph called from ftfont_text_extents takes much time and > calculates font metrics repeatedly without caching. In particular, > it's really slow if the font is actually in a gzipped PCF format. [...] > 0.0% 22.2% FT_Load_Glyph > 0.1% 22.0% PCF_Glyph_Load > 0.0% 21.8% FT_Stream_Seek > 0.0% 21.8% ft_gzip_stream_io > 0.0% 21.8% ft_gzip_file_io > 0.0% 21.8% ft_gzip_file_skip_output > 21.3% 21.8% ft_gzip_file_fill_output > 0.5% 0.5% ft_gzip_file_fill_input Ummm, I didn't realize this calling sequence. I agree that we surely need some kind of caching mechanism. But, it seems that FreeType itself has that mechanism called "Cache Sub-System". Perhaps, we should use it. --- Kenichi Handa handa@m17n.org