You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2015/03/02 15:18:04 UTC
[jira] [Commented] (LUCENE-6325) improve perf and memory of
FieldInfos.fieldInfo(int)
[ https://issues.apache.org/jira/browse/LUCENE-6325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14343179#comment-14343179 ]
Robert Muir commented on LUCENE-6325:
-------------------------------------
btw, as far as whether the "sparse" case is tested, i added "assert false" to this and ran core tests (no \@Slow, no \@Nightly):
{noformat}
[junit4] Tests with failures (first 10 out of 37):
[junit4] - org.apache.lucene.index.TestStressIndexing2.testRandom
[junit4] - org.apache.lucene.index.TestStressIndexing2.testRandomIWReader
[junit4] - org.apache.lucene.index.TestStressIndexing2.testMultiConfig
[junit4] - org.apache.lucene.codecs.asserting.TestAssertingStoredFieldsFormat.testMerge
[junit4] - org.apache.lucene.search.TestSearcherManager.testSearcherManager
[junit4] - org.apache.lucene.index.TestBinaryDocValuesUpdates.testDeleteUnusedUpdatesFiles
[junit4] - org.apache.lucene.index.TestBinaryDocValuesUpdates.testManyReopensAndFields
[junit4] - org.apache.lucene.index.TestBinaryDocValuesUpdates.testSegmentMerges
[junit4] - org.apache.lucene.index.TestBinaryDocValuesUpdates.testMultipleDocValuesTypes
[junit4] - org.apache.lucene.index.TestBinaryDocValuesUpdates.testUpdatesOrder
{noformat}
So I think its tested (there are several tests cranking fields like TestManyFields). But if we can do it better, I am all for that.
> improve perf and memory of FieldInfos.fieldInfo(int)
> ----------------------------------------------------
>
> Key: LUCENE-6325
> URL: https://issues.apache.org/jira/browse/LUCENE-6325
> Project: Lucene - Core
> Issue Type: Sub-task
> Reporter: Robert Muir
> Fix For: Trunk, 5.1
>
> Attachments: LUCENE-6325.patch
>
>
> FieldInfos.fieldInfo(int) looks up a field by number and returns its FieldInfo.
> This method is called per-field-per-doc in things like stored fields and vectors readers.
> Unfortunately, today this method is always backed by a TreeMap. In most cases a simple array is better, its faster and uses less memory.
> These changes made significant difference in stored fields checkindex time with my test index (had only 10 fields). Maybe it helps merge as well.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org