Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lower memory requirements #15

Open
tokee opened this issue Jan 24, 2015 · 0 comments
Open

Lower memory requirements #15

tokee opened this issue Jan 24, 2015 · 0 comments
Assignees

Comments

@tokee
Copy link
Contributor

tokee commented Jan 24, 2015

In order to make stored String values into DocValues, all the Strings are kept in a TreeSet<BytesRef>. The overhead is very large, as 1MB of heap can hold only 6500 values. Having 1M unique stored values in a field requires 153MB of heap.

Most of the memory is used for Java Objects and references, not the characters themselves. Storing the BytesRef in a BytesRef-array and keeping track of ordering and duplicates with a heap of native longs would be one memory-saving solution.

@tokee tokee self-assigned this Jan 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant