From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Indexed search with grep-like output Date: Sun, 2 Jan 2011 14:46:45 +0100 Message-ID: References: <831v4wpcue.fsf@gnu.org> <83wrmone2h.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1293976042 10944 80.91.229.12 (2 Jan 2011 13:47:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 2 Jan 2011 13:47:22 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 02 14:47:16 2011 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.69) (envelope-from ) id 1PZOHC-0004Jc-IW for ged-emacs-devel@m.gmane.org; Sun, 02 Jan 2011 14:47:14 +0100 Original-Received: from localhost ([127.0.0.1]:58198 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZOHC-0000UY-24 for ged-emacs-devel@m.gmane.org; Sun, 02 Jan 2011 08:47:14 -0500 Original-Received: from [140.186.70.92] (port=39711 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZOH7-0000UL-IO for emacs-devel@gnu.org; Sun, 02 Jan 2011 08:47:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PZOH5-0000Vi-Hf for emacs-devel@gnu.org; Sun, 02 Jan 2011 08:47:09 -0500 Original-Received: from mail-ey0-f169.google.com ([209.85.215.169]:41548) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PZOH5-0000Up-9Y; Sun, 02 Jan 2011 08:47:07 -0500 Original-Received: by eyh6 with SMTP id 6so2645033eyh.0 for ; Sun, 02 Jan 2011 05:47:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=0+Cj7uUEYDH2bJK7ApkyXMWgCavkChNaUa5VZbOA5pI=; b=Pe47g+ON8GZjqQ6yZPwloDeYemSwtPZ81wCaRP0yeSoMmWzjvXInV07JvMwUQIkdPD ipL8WbIMH+c0UMafFp2OMydhiQ67G72Qm+wQFPUDTVdWIgzYJhyyEkIUUYHlJymgFvuQ /LtyRJic5b9GP9/bFNDbXztz5CVKiN0po3rfs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=g9U76Knp66sP8+dUqz1BALT5zJWe3pH/h57I7d5/N6BA3a2GNIzmbqOLOszqqHcNTe kUY0XYj/0Ho6c3uTJeu86CqUZ2PrOhi+y9bFTQfyNwmi9RWFEo8EstWlMzaATq4K/J8e LsefnaNNE6nOQdkcRB8W7zuBrDVZmwUzHvT4A= Original-Received: by 10.213.28.147 with SMTP id m19mr16237473ebc.97.1293976025583; Sun, 02 Jan 2011 05:47:05 -0800 (PST) Original-Received: by 10.213.20.148 with HTTP; Sun, 2 Jan 2011 05:46:45 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:134160 Archived-At: On Sun, Jan 2, 2011 at 2:31 PM, Eli Zaretskii wrote: >> From: Lennart Borgman >> Date: Sun, 2 Jan 2011 12:40:10 +0100 >> Cc: emacs-devel@gnu.org >> >> On Sun, Jan 2, 2011 at 12:18 PM, Eli Zaretskii wrote: >> >> From: Lennart Borgman >> >> Date: Sun, 2 Jan 2011 05:12:32 +0100 >> >> Cc: emacs-devel@gnu.org >> >> >> >> I do not know about other search engines, but at least Windows Deskto= p >> >> Search allows you to restrict the search later. >> > >> > Because it's dog slow. >> >> Is it? Can you give an example? > > `lid' takes 0.1sec to return results of a query of a DB that indexes > 12,800 source files of a large C++ software system. =C2=A0What's your > timing of a comparable query with Windows Desktop? Around 2 seconds. But that is from within Emacs on a very slow computer. (And less than 8,000 files.) >> I read that people have had good experience with Lucene and large >> amounts of files. Have you tested Lucene? > > Yes, I use one of the tools that builds on Lucene (see > http://www.methods.co.nz/docindexer/) to index MS Office documents > (some 17,000 of them) I have on my office machine. =C2=A0It is also very > fast: just a few seconds to return a query. Is that from within Emacs or? >> > `lid' is very fast, so if you don't want to >> > index each tree separately, you can filter the output (which includes >> > the full absolute file name) in Emacs, in the process filter that >> > accepts `lid's output. >> >> Is not that slow since it requires a lot process switching? > > Not slower than grep or compilation -- if you want the results to be > available to Emacs, and don't want to use synchronous subprocesses (so > that you could continue working while it runs, and perhaps even lookup > the first bunch of hits), you will always use this method. =C2=A0(I don't > understand what you mean by "a lot of process switching" -- there are > two processes running in parallel.) The subprocess must be the current process when it sends the output to Emacs and Emacs must be the current process when it receives the output. So the operating system has to switch between them and as I understands it that operation is rather costly on w32 especially. (But I do not remember any comparable timings any longer.)