Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 72095 invoked from network); 1 May 2008 21:53:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 May 2008 21:53:50 -0000 Received: (qmail 35276 invoked by uid 500); 1 May 2008 21:53:49 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 35233 invoked by uid 500); 1 May 2008 21:53:49 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 35222 invoked by uid 99); 1 May 2008 21:53:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 May 2008 14:53:49 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mike.klaas@gmail.com designates 209.85.200.168 as permitted sender) Received: from [209.85.200.168] (HELO wf-out-1314.google.com) (209.85.200.168) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 May 2008 21:53:04 +0000 Received: by wf-out-1314.google.com with SMTP id 28so1001032wfc.20 for ; Thu, 01 May 2008 14:53:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; bh=3KGqq0iWTnwQ+7ThylkLjTOiB/apFe1J9Kn9HXAJGFw=; b=qz4iQo1AdZFiDJhQ7GUyL4FdIxyHjdPZzI3YjBUiv+DEhYoyH36UyfJql/BsC02U9D53MDM+VbEIVXQRgo38Ni1Ff1CQu2HEh5DWPm0dxbh+0jaf46yxFPT202YWT3DQlLX8+hcAqoXj5JIWh2t3r2+5RPrAzSrJyZRyOxjr/F4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; b=ZY5/EyLQu1/QqiEaBG7n7ZktfKBTouTe1xMTKP0B1bQOJ9uuta5z8tQYslAcMIyVkvwqZJopgS1eWzXWVh8DhJVn3umkDMaYA/o9lL5LVF/4aJ+k2oEAnO4c6/FG1zjyzBrau5vqJQ4GgMlShrXZc4a+YYbd5gG6fMr7ZTOlyzc= Received: by 10.142.204.18 with SMTP id b18mr973818wfg.126.1209678799110; Thu, 01 May 2008 14:53:19 -0700 (PDT) Received: from ?192.168.1.120? ( [24.86.255.85]) by mx.google.com with ESMTPS id 22sm5563614wfd.19.2008.05.01.14.53.17 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 01 May 2008 14:53:17 -0700 (PDT) Message-Id: <62519E11-035B-4A5B-AADE-6407CD7ADC96@gmail.com> From: Mike Klaas To: java-dev@lucene.apache.org In-Reply-To: <200805011903.43275.lucene@nitwit.de> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: LazyRAMDirectory Date: Thu, 1 May 2008 14:53:14 -0700 References: <200805011903.43275.lucene@nitwit.de> X-Mailer: Apple Mail (2.919.2) X-Virus-Checked: Checked by ClamAV on apache.org On 1-May-08, at 10:03 AM, Timo Nentwig wrote: > Hello developers, > > I do have enough memory to load the index completely into RAM but > can't live > with the fact that it takes multiple minutes to do so. > > So I can up with the idea of implementing a RAMDirectory proxy that > does the > Directory.copy() asyncronously and while not finished delegating to > the > FSDirectory. > > Does somebody already have done this or is this for some reason a > bad idea to > do? Is it a bad idea? Well, there is a version of Directory that lazily- loads only needed parts of the index in memory, eventually storing the whole index there given enough ram. It's called FSDirectory :) Depending on how tightly your RAMDirectory fits in memory, you might find that the FSD gets memory-starved before the RAMDir has finished loading and suffer horrible performance as a consequence. -Mike --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org