From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Recentf cleanup optmization Date: Tue, 08 Sep 2009 12:23:54 -0400 Message-ID: References: <87iqfxnbp4.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1252427055 17289 80.91.229.12 (8 Sep 2009 16:24:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Sep 2009 16:24:15 +0000 (UTC) Cc: emacs-devel@gnu.org To: vincent.belaiche@gmail.com (Vincent =?iso-8859-1?Q?Bela=EFche?=) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 08 18:24:08 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ml3UG-0000wC-Hy for ged-emacs-devel@m.gmane.org; Tue, 08 Sep 2009 18:24:08 +0200 Original-Received: from localhost ([127.0.0.1]:45234 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ml3UF-0006fk-Uj for ged-emacs-devel@m.gmane.org; Tue, 08 Sep 2009 12:24:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ml3UB-0006fI-3C for emacs-devel@gnu.org; Tue, 08 Sep 2009 12:24:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ml3U6-0006ek-HW for emacs-devel@gnu.org; Tue, 08 Sep 2009 12:24:02 -0400 Original-Received: from [199.232.76.173] (port=45970 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ml3U6-0006eh-BA for emacs-devel@gnu.org; Tue, 08 Sep 2009 12:23:58 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:33466) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ml3U5-0005pU-VX for emacs-devel@gnu.org; Tue, 08 Sep 2009 12:23:58 -0400 Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id n88GNs1r010898; Tue, 8 Sep 2009 12:23:54 -0400 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 2DB393A8F3; Tue, 8 Sep 2009 12:23:54 -0400 (EDT) In-Reply-To: <87iqfxnbp4.fsf@gmail.com> ("Vincent =?iso-8859-1?Q?Bela=EFch?= =?iso-8859-1?Q?e=22's?= message of "Sat, 05 Sep 2009 08:32:39 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3358=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:115135 Archived-At: > I realized that recentf cleanup is very slow when you have a long list > of saved items (e.g. as few as 60). This is because there is a duplicate > suppression based on linear search (quadratic time). > Starting from latest code on CVS I made an optimization using a hash > table, and this solves the issue. > Please find it herein attached. Could you send it as a patch instead? Otherwise, it's difficult to see what changes you've made. Stefan