lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 23774] New: - [PATCH] Clonable RAMDirectory
Date Mon, 13 Oct 2003 13:39:51 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23774>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23774

[PATCH] Clonable RAMDirectory

           Summary: [PATCH] Clonable RAMDirectory
           Product: Lucene
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Store
        AssignedTo: lucene-dev@jakarta.apache.org
        ReportedBy: otis@apache.org
                CC: nick.smith@techop.ch


A patch for RAMDirectory that makes it clonable.

May 22nd, 2003 contribution from "Nick Smith" <nick.smith@techop.ch>

Original email:
Hi Lucene Developers,
   Thanks for a great product!
   
I need to be able to 'snapshot' our in-memory indices (RAMDirectory
instances).

I have been using :

RAMDirectory activeDir = new RAMDirectory();
// many inserts, deletes etc
RAMDirectory cloneDir = new RAMDirectory(activeDir);

but unfortunately this is rather slow for large indices.

I have a suggestion - implement java.lang.Cloneable interface
in RAMDirectory.  I.e to be able to call :

RAMDirectory cloneDir = (RAMDirectory)activeDir.clone();

This bypasses the input/output stream handling of the
copy constructor by cloneing the underlying buffers that
form the directory and is much faster. (Diff attached).

Any comments?

Regards,

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message