From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Liu Newsgroups: gmane.emacs.bugs Subject: bug#11906: 24.1; completion-at-point failures Date: Fri, 10 May 2013 14:38:09 +0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1368167946 22847 80.91.229.3 (10 May 2013 06:39:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 10 May 2013 06:39:06 +0000 (UTC) Cc: 11906@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 10 08:39:04 2013 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 1Uagyt-0000GM-Aj for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 May 2013 08:39:03 +0200 Original-Received: from localhost ([::1]:33447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uagys-0005O0-US for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 May 2013 02:39:02 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uagyo-0005Nj-MH for bug-gnu-emacs@gnu.org; Fri, 10 May 2013 02:39:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uagyn-0001Oi-O4 for bug-gnu-emacs@gnu.org; Fri, 10 May 2013 02:38:58 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uagyn-0001Oe-KJ for bug-gnu-emacs@gnu.org; Fri, 10 May 2013 02:38:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Uagyv-0004ik-Ei for bug-gnu-emacs@gnu.org; Fri, 10 May 2013 02:39:05 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Leo Liu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 May 2013 06:39:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11906 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11906-submit@debbugs.gnu.org id=B11906.136816792618102 (code B ref 11906); Fri, 10 May 2013 06:39:04 +0000 Original-Received: (at 11906) by debbugs.gnu.org; 10 May 2013 06:38:46 +0000 Original-Received: from localhost ([127.0.0.1]:35281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uagya-0004ht-8e for submit@debbugs.gnu.org; Fri, 10 May 2013 02:38:46 -0400 Original-Received: from mail-pa0-f51.google.com ([209.85.220.51]:45534) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UagyN-0004hM-Ie for 11906@debbugs.gnu.org; Fri, 10 May 2013 02:38:38 -0400 Original-Received: by mail-pa0-f51.google.com with SMTP id ld10so2686820pab.10 for <11906@debbugs.gnu.org>; Thu, 09 May 2013 23:38:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:face:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=cmPq63013X/RuNYWizGRA/BB2xqTIjXnjRNjoxfztvk=; b=sMpcbda7Uvef2PlCM1iZuCNPnniyUN3NMinraLneJzfNLTXygW1bd1Qh4E6sQaRQYY BDMxZ2BLWS8soDW3axD7HZaVmftCxSd4jpRYFvxWeSlmR51fE8/ackIVeenune6vH3nu bQ9ErnCSmUxEFFEVegKMzzJ/SQy4KrVuudFktBP3s1naYn6nY6vkupNm1oW+p9HepFZT tKTETWpKIFq3c7Z2oY2sKdAALBWXt7pW9Nl9VWnl2AXXz+q2oRWKKHYI7t5xlmtnvMZJ Pi+ofuVMHTVWlJda5Yu9dhEdFUojYtp8nKW6KHjs7M4k6WmydcQ/MYjprRGx2uoSgEI+ nxbA== X-Received: by 10.66.160.104 with SMTP id xj8mr16365562pab.3.1368167902285; Thu, 09 May 2013 23:38:22 -0700 (PDT) Original-Received: from Zeuss-MacBook.local (li511-224.members.linode.com. [66.175.216.224]) by mx.google.com with ESMTPSA id qb1sm1439958pbb.33.2013.05.09.23.38.18 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 09 May 2013 23:38:21 -0700 (PDT) Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAG1BMVEUAAAA9Cgm3Hx1WWFWA gn+WmJWsrqv4+vcCAwCRl2MkAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAYoA AAGKATOXMFgAAAAHdElNRQfXAQwDNR+ZJmElAAABIklEQVQoz22SPW+DQAyGWUq65qasd9PNUSX4 AZHK2C1rJy5jpDS4IwRVup9dn7GNafpKIPPgzztXFSujqq1eM2n8h22oMkvxI/i9C97kRfMRUN55 dS3BrsAwBXUtMLAO4lryh8kTjOxKpQNniNxAgZOEe4bZwsDTFhKdqZRLNII4OQNHhEuq/RMkm6Cj TnnEA/fk0BorcYn5qA3oaeAxbaBOLrX+9G48NZ2Fzc2tzDM8Q+tMypEOqYHh8mAWaaK3U/cDMOT5 aMZMABgPXc7zPMs1A8DXO756GFJ/4fMEq47hTsAdn5avoxZ4ywl0c2w4Flu2Ybeyb3S+EqxX2DYA H8veJGEDTnHnrXvRaPyt+2kSfK6rfBZ2tUtfP/mR+pR6sX8BUZ/cDV7tvkoAAAAASUVORK5CYII= In-Reply-To: (Stefan Monnier's message of "Thu, 12 Jul 2012 10:00:55 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.8.3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:74116 Archived-At: On 2012-07-12 22:00 +0800, Stefan Monnier wrote: >> Emacs. It seems completion-at-point should be able to do its entire work >> after obtaining once the data from those functions. This would free >> users of completion-at-point-functions from worrying about caching. > > Sometimes, you can't get the whole data at once (e.g. completion of > a file-name would have to return all the files in all directories if it > had to be done "a once"). > > So, this is not an option. But we could provide a standard > completion-table constructor that provides caching. > >> completion-at-point also invokes those functions in order to decide when >> to exit. This causes problems illustrated at the beginning of this >> report and, for example, I have also experienced delay in inserting >> space, dot, etc following a completion. > > Can you explain how "this causes problems"? What makes you think > it's related? OK, I just hit another performance issue with this repetitive invoking of completion functions by completion-at-point. To see this issue: 1. emacs -q (choose an emacs that doesn't have the fix in revision 112539) 2. M-x run-octave 3. Type 'uint ' 4. Type 'history 10' You should see: 1040 completion_matches ("uint"); 1041 completion_matches ("uint"); 1042 completion_matches ("uint"); 1043 history 5 So basically computation for the matches against 'uint' has been done three times. Now when the computation is expensive (such as against the empty string "") one should observe a terrible delay. I have to work around this issue in octave by revision 112539. Leo