-
-
Notifications
You must be signed in to change notification settings - Fork 719
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
Doc blocks get too large if no fields are stored #1552
Comments
Nice find! |
The issue is the linear scanning inside a block ( Merge Code
|
The default block-size appear to be 16384, which can store up to 8192 empty documents (one byte for the size, and one byte for the field count). It's not that big of a number imo. However the merge code is linear-scanning the block n times, so we end-up with something in n². I think |
|
how can I reproduce the slowness you observed? |
Don't store any fields, enable sorting, and index a large amount of docs that includes merging. For me it was around 50% time spent in get_document_bytes`. I think that case is slightly unusual, so I'd go with a limit on the number of docs as a general solution, vs special path. |
If no fields are stored, we store too many documents in a block. The lookup times get very slow, e.g. when merging.
There are two options:
The text was updated successfully, but these errors were encountered: