From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Pixel-based display functions Date: Fri, 30 Jan 2015 08:52:27 +0200 Message-ID: <831tmcn4k4.fsf@gnu.org> References: <83sifzjflk.fsf@gnu.org> <87fvbyagaw.fsf@building.gnus.org> <83iogujvbq.fsf@gnu.org> <87tx0ee7rf.fsf@building.gnus.org> <83egricpvg.fsf@gnu.org> <87zj97vic8.fsf@building.gnus.org> <83wq4argjp.fsf@gnu.org> <87iofui8vo.fsf@building.gnus.org> <838ugqqczp.fsf@gnu.org> <877fw9dndz.fsf@building.gnus.org> <83a914ozsh.fsf@gnu.org> <874mrb1t62.fsf_-_@building.gnus.org> <87vbjrl49k.fsf@violet.siamics.net> <8361bqogah.fsf@gnu.org> <87k306pfi9.fsf@building.gnus.org> <87egqekrd7.fsf@building.gnus.org> <877fw53eat.fsf@building.gnus.org> <877fw4zsdv.fsf@building.gnus.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1422600779 30811 80.91.229.3 (30 Jan 2015 06:52:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 30 Jan 2015 06:52:59 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 30 07:52:59 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YH5Rp-0004Ji-Id for ged-emacs-devel@m.gmane.org; Fri, 30 Jan 2015 07:52:57 +0100 Original-Received: from localhost ([::1]:35005 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YH5Ro-0001Za-Ux for ged-emacs-devel@m.gmane.org; Fri, 30 Jan 2015 01:52:56 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YH5RU-0001ZV-D0 for emacs-devel@gnu.org; Fri, 30 Jan 2015 01:52:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YH5RQ-0001E6-6p for emacs-devel@gnu.org; Fri, 30 Jan 2015 01:52:36 -0500 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:36753) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YH5RP-0001Bv-Ud for emacs-devel@gnu.org; Fri, 30 Jan 2015 01:52:32 -0500 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NIZ004009CZ5N00@mtaout25.012.net.il> for emacs-devel@gnu.org; Fri, 30 Jan 2015 08:47:39 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NIZ000SP9JFMU30@mtaout25.012.net.il>; Fri, 30 Jan 2015 08:47:39 +0200 (IST) In-reply-to: <877fw4zsdv.fsf@building.gnus.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:182022 Archived-At: > From: Lars Ingebrigtsen > Date: Fri, 30 Jan 2015 17:37:00 +1100 > > `font-get-glyphs' on a large region is quite fast, but since the font > may vary, I'm calling it on a char-by-char basis, and that's s-l-o-w. That's your problem: you should call it on a run of characters that have the same face. Use next-single-char-property-change to find where such runs begin and end. > `font-get-glyphs' returns an awful lot of data, and virtually all of it > isn't used for doing this sort of filling, so I have a suspicion that > I'm going to end up writing a new C-level function that just returns > glyph widths fast. That'd be a waste of effort, IMO. Just do the above, and I think the speed will be acceptable.