You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2015/06/28 20:01:05 UTC

[jira] [Commented] (LUCENE-6630) Further improve memory of FieldInfos

    [ 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org