[ 
http://issues.apache.org/jira/browse/LUCENE-475?page=comments#action_12359068 ] 

Hoss Man commented on LUCENE-475:
---------------------------------


I'm no expert on File I/O, so i don't know if this is/isn't a good change to 
make, but i deplore constants:

If this patch is a good idea, then i'd like to suggest that instead of a static 
constant for the buffer size, a new constructor arg be added specifying the 
buffer size, with the default (ie: no value, or "0" specified) being to use the 
old behavior (ie: a buffer the same size as the file)

>  RAMDirectory(Directory dir, boolean closeDir)  constructor uses memory 
> inefficiently.
> --------------------------------------------------------------------------------------
>
>          Key: LUCENE-475
>          URL: http://issues.apache.org/jira/browse/LUCENE-475
>      Project: Lucene - Java
>         Type: Improvement
>   Components: Store
>     Reporter: Volodymyr Bychkoviak
>  Attachments: RamDirectory.diff
>
> recently I found that  RAMDirectory(Directory dir, boolean closeDir)  
> constructor uses memory inefficiently.
> files from source index are read entirely intro memory as single byte array 
> which is after all is thrown away. And if I want to load my 200M optimized, 
> compound format index to memory for faster search I should give JVM at least 
> 400Mb memory limit. For larger indexes this can be an issue.
> I've attached patch how to solve this problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to