From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: fix for bug 10994 breaks ido customizations in major way Date: Sat, 04 May 2013 10:58:03 +0200 Message-ID: <87ip2zm89w.fsf@wanadoo.es> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1367657897 6063 80.91.229.3 (4 May 2013 08:58:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 May 2013 08:58:17 +0000 (UTC) Cc: Leo Liu , emacs-devel@gnu.org To: Le Wang Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 04 10:58:15 2013 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 1UYYII-0002sZ-IH for ged-emacs-devel@m.gmane.org; Sat, 04 May 2013 10:58:14 +0200 Original-Received: from localhost ([::1]:52012 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYYII-0006yU-82 for ged-emacs-devel@m.gmane.org; Sat, 04 May 2013 04:58:14 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45100) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYYIE-0006yC-P6 for emacs-devel@gnu.org; Sat, 04 May 2013 04:58:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYYID-0006V2-Rs for emacs-devel@gnu.org; Sat, 04 May 2013 04:58:10 -0400 Original-Received: from impaqm1.telefonica.net ([213.4.138.17]:62496 helo=telefonica.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYYID-0006U1-Hz for emacs-devel@gnu.org; Sat, 04 May 2013 04:58:09 -0400 Original-Received: from IMPmailhost2.adm.correo ([10.20.102.39]) by IMPaqm1.telefonica.net with bizsmtp id Xkow1l00P0r0BT63Mky4gH; Sat, 04 May 2013 10:58:04 +0200 Original-Received: from qcore ([83.40.116.149]) by IMPmailhost2.adm.correo with BIZ IMP id Xky31l0073DUQuj1iky3C6; Sat, 04 May 2013 10:58:04 +0200 X-CMAE-Analysis: v=1.1 cv=VX9xJAn9xOxHJcks8bX6w7MHmm093F1wQZggtrLy5KI= c=1 sm=1 a=DQlLCnKHR5QA:10 a=jB3pZ5H4rBYA:10 a=sSE9TqpJnXXWdi4WNHITQg==:17 a=pGLkceISAAAA:8 a=FSJ3J83pkuZDyy_9xbQA:9 a=MSl-tDqOz04A:10 a=FjiQGhI7cFb0mZmH:21 a=ecGS7lOC87dPq85H:21 a=sSE9TqpJnXXWdi4WNHITQg==:117 X-original-sender: 981711563@telefonica.net In-Reply-To: (Le Wang's message of "Sat, 4 May 2013 15:00:24 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 213.4.138.17 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:159285 Archived-At: Le Wang writes: > On Sat, May 4, 2013 at 4:33 AM, Leo Liu wrote: > >> On 2013-05-03 20:49 +0800, Le Wang wrote: >> > There are a few ido customizations floating around that propertizes text. >> > This will break all of them. I don't think this fix is acceptable. >> >> That I wouldn't know. I only know what is in emacs and that the fix has >> been in use for a while. Feel free to propose a different fix >> > > Sure, I've attached a patch that deletes duplicates. This change introduces a serious slowdown which is noticeable for large candidate lists (try with 10000 elements.) The slowdown happens on every invocation. It is obvious that having duplicate candidates makes no sense, but at the same time scanning the list in advance for all duplicates is expensive. I'll suggest detecting and removing the duplicates on the navigation functions, maybe just the adjacent duplicates (using the list as a ring.) Another "fix" could be to require a duplicate-free list for ido-complete.