Hi Daniel,
i just had a look at the new implementation that FSDirectory deletes
lucene related files only. I like the patch, but i think we left some
room for optimization. In the current implementation, it's necessary to
run thru all known Lucene extensions (13 for the moment), for each call
of "LuceneFileFilter.accept()". If creating an index in a directory
which contains several hundred files, this definitly will be a
bottleneck. So creating a new Index in a directory containing 100 files,
we will endup with 1300 calls to
"if (name.endsWith("."+IndexReader.FILENAME_EXTENSIONS[i]))" which
always needs to create a new StringBuffer to merge the two strings.
Therefore i would like to propose two changes:
1) we should store the extension in a hash and not in String[] to have a
faster lookup
2) check for the file extension only without using the "."
any thoughts
Bernhard
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]