You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by bu...@apache.org on 2004/11/13 23:34:17 UTC

DO NOT REPLY [Bug 32228] New: - [PATCH] SegmentReader does unnecessary checks for existence of files

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32228>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32228

[PATCH] SegmentReader does unnecessary checks for existence of files

           Summary: [PATCH] SegmentReader does unnecessary checks for
                    existence of files
           Product: Lucene
           Version: 1.4
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Search
        AssignedTo: lucene-dev@jakarta.apache.org
        ReportedBy: kevinoliver@mac.com


While investigating some performance issues during queries, I stumbled upon a
small issue in SegmentReader in regards to compound files. Specifically, the
openNorms() method takes in the directory to use, but then has its own logic as
to use that directory or the directory from its base class (IndexReader). When
an index has many field infos, we have about 30, this logic about checking for
files existing adds a significant overhead. Although this is a small
inefficiency in a normal file system, our file system is mounted over nfs, and
this check is relatively expensive. 

The rest of the class doesn't do this sort of check for other files. By changing
this code to work like the rest of the methods in the class (i.e. just using the
passed in directory), things are a good bit quicker on my end. I don't see any
issues with this patch.

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