From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#20887: 'make bootstrap' now verrrry slow due to recent isearch changes Date: Thu, 25 Jun 2015 18:03:57 +0300 Message-ID: <838ub7eso2.fsf@gnu.org> References: <558A0950.2000501@cs.ucla.edu> <2nbng5pou7.fsf@fencepost.gnu.org> <558AB250.5040908@cs.ucla.edu> <83vbeddu4d.fsf@gnu.org> <83si9hdthc.fsf@gnu.org> <83mvzoex5g.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1435244726 13951 80.91.229.3 (25 Jun 2015 15:05:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Jun 2015 15:05:26 +0000 (UTC) Cc: 20887@debbugs.gnu.org To: bruce.connor.am@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 25 17:05:14 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1Z88iF-0000kD-RA for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Jun 2015 17:05:11 +0200 Original-Received: from localhost ([::1]:56133 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z88iF-0002W7-0s for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Jun 2015 11:05:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38559) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z88iC-0002U3-8P for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 11:05:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z88i7-0004uz-QO for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 11:05:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55932) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z88i7-0004uk-OH for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 11:05:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z88i6-0004iN-Ut for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2015 11:05:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Jun 2015 15:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20887 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20887-submit@debbugs.gnu.org id=B20887.143524465518052 (code B ref 20887); Thu, 25 Jun 2015 15:05:02 +0000 Original-Received: (at 20887) by debbugs.gnu.org; 25 Jun 2015 15:04:15 +0000 Original-Received: from localhost ([127.0.0.1]:57378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z88hK-0004h3-Gp for submit@debbugs.gnu.org; Thu, 25 Jun 2015 11:04:14 -0400 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:37370) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z88hG-0004gg-To for 20887@debbugs.gnu.org; Thu, 25 Jun 2015 11:04:12 -0400 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NQI0090098HDD00@mtaout25.012.net.il> for 20887@debbugs.gnu.org; Thu, 25 Jun 2015 17:59:48 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NQI009FD9NNW610@mtaout25.012.net.il>; Thu, 25 Jun 2015 17:59:48 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:104339 Archived-At: > Date: Thu, 25 Jun 2015 00:37:51 +0100 > From: Artur Malabarba > Cc: 20887@debbugs.gnu.org > > I think I see now. Reading the code for `get-char-code-property' shows > that I had to call a function stored in the extra slot. > Calling that function on the table seems to be sufficient to populate it. Indeed, the Unicode tables are tricky, in that with some of them you need to call the function stored in the 1st extra slot to reconstruct the value for a character. (And if there's no function in that extra slot, you should use get-unicode-property-internal to decode the value.) However, I think the version you pushed can be further improved. For starters, you don't need to populate the table first, and only then use it; you can produce the property value for a character and use it in the same call to map-char-table. For example, the following snippet loops only once over the table, and does its job in about 2 sec: (let* ((table (unicode-property-table-internal 'decomposition)) (func (char-table-extra-slot table 1))) (map-char-table (lambda (key val) (if (consp key) (message "%s %s" key (funcall func (car key) val table)) (message "%s %s" key (funcall func key val table)))) table)) All you need is replace the silly 'message' calls with the body of your processing code (and handle all the characters in a range of codepoints, not just the first one). Your code also calls unicode-property-table-internal twice, and the above method will solve that as well. Thanks.