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#23377: 25.0.93; Completion is extremely slow for insert-char Date: Tue, 26 Apr 2016 09:21:42 +0300 Message-ID: <83potc28ll.fsf@gnu.org> References: <2fd9a9b4-fb49-da6e-f13b-0fce4708159a@cs.ucla.edu> <34cb394c-1a2f-4fe5-8a2f-d26702487aef@default> <571EEA4A.3020105@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1461651806 12995 80.91.229.3 (26 Apr 2016 06:23:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Apr 2016 06:23:26 +0000 (UTC) Cc: nljlistbox2@gmail.com, monnier@IRO.UMontreal.CA, 23377@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 26 08:23:15 2016 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 1auwOw-00088c-Nh for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 Apr 2016 08:23:14 +0200 Original-Received: from localhost ([::1]:36422 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1auwOs-00040H-N9 for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 Apr 2016 02:23:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1auwOn-0003uR-OZ for bug-gnu-emacs@gnu.org; Tue, 26 Apr 2016 02:23:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1auwOk-000870-Gv for bug-gnu-emacs@gnu.org; Tue, 26 Apr 2016 02:23:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35041) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1auwOk-00086w-EI for bug-gnu-emacs@gnu.org; Tue, 26 Apr 2016 02:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1auwOk-0000PO-BH for bug-gnu-emacs@gnu.org; Tue, 26 Apr 2016 02:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Apr 2016 06:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23377 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch confirmed Original-Received: via spool by 23377-submit@debbugs.gnu.org id=B23377.14616517321478 (code B ref 23377); Tue, 26 Apr 2016 06:23:02 +0000 Original-Received: (at 23377) by debbugs.gnu.org; 26 Apr 2016 06:22:12 +0000 Original-Received: from localhost ([127.0.0.1]:47374 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1auwNv-0000Nl-MS for submit@debbugs.gnu.org; Tue, 26 Apr 2016 02:22:11 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48413) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1auwNu-0000NZ-SU for 23377@debbugs.gnu.org; Tue, 26 Apr 2016 02:22:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1auwNm-0007rv-JP for 23377@debbugs.gnu.org; Tue, 26 Apr 2016 02:22:05 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41829) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1auwNm-0007rr-Fx; Tue, 26 Apr 2016 02:22:02 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1989 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1auwNl-0007D8-Da; Tue, 26 Apr 2016 02:22:01 -0400 In-reply-to: <571EEA4A.3020105@cs.ucla.edu> (message from Paul Eggert on Mon, 25 Apr 2016 21:10:50 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:116854 Archived-At: > From: Paul Eggert > Date: Mon, 25 Apr 2016 21:10:50 -0700 > Cc: "N. Jackson" , 23377@debbugs.gnu.org > > Drew Adams wrote: > > if the main reason to disable it is for performance in > > an extreme use case (C-x 8 RET TAB) > > It's not that extreme. It's natural for a user to get the whole list and then > use C-s to find the desired character. > > Also, there's a problem even in less-"extreme" cases. I just now tried 'C-x 8 > RET B TAB', which lists every character whose name starts with "B", and this > took about 18 s on my platform, whereas with Emacs 24.5 it is almost > instantaneous. 18 s is waayyy to slow for this sort of user interaction. It takes less than 2 sec here. The original recipe takes 11 sec. This is a 32-bit optimized build with wide ints, so a build without that option should be even faster. IOW, on a reasonably modern platform and the default build options, the feature performs with reasonable speed. E.g., this: C-x C-f /foo/bar/ TAB TAB takes 2.5 sec here for a /foo/bar/ with more than 3600 files. So it's not like we don't see slow completion sometimes. > Stefan's suggestion of a config var sounds good. It's a bit late to be adding > features to the emacs-25 branch, though, so I'm inclined to revert in emacs-25 > (with a "do not merge to master") and add a customizable var in master. No, please don't revert; it's too late for that. Adding an option is okay, and it should be ON by default, to keep the behavior we had in Emacs 25, including all the pretests, until now. A NEWS entry about this would also be nice. Btw, one way to make this much faster is install the fonts for the characters that display as boxes with hex codepoints. Emacs only looks up fonts for characters it needs to display, and the latest addition of Unicode added quite a few characters shown in the first screen of *Completion*, which I suppose have no fonts on your systems (I, too, don't have them). In addition, Emacs 25 shows a larger window for the *Completions* buffer by default, which also contributes to the time it takes. Thanks.