[
https://issues.apache.org/jira/browse/LUCENE-6630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14604810#comment-14604810
]
Michael McCandless commented on LUCENE-6630:
--------------------------------------------
+1, this looks nice!
Maybe add a comment above {{ return o1.number - o2.number;}} that this is safe
(can't overflow int) because {{number}} is non-negative?
We can increase the 1/16th heuristic now? We picked that because that was the
cutover to minimize RAM, but with this change it suddenly becomes a time/space
tradeoff because the sparse representation is now always <= the non-sparse one.
Maybe we should always just be sparse, unless it's complete dense?
> Further improve memory of FieldInfos
> ------------------------------------
>
> Key: LUCENE-6630
> URL: https://issues.apache.org/jira/browse/LUCENE-6630
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Ryan Ernst
> Attachments: LUCENE-6630.patch
>
>
> In LUCENE-6325, FieldInfos were improved to use an array except in very
> sparse cases. In the sparse cases, a TreeMap is still used. However, even in
> the sparse case, we can still use an array, and then use binary search. The
> perf will be equivalent, but memory use should be much less.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]