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
Limit the row list allocation based on the row count #3756
Conversation
I've forgot to mention @katzyn
In the reproducer linked, the H2 version is h2database/h2/src/main/org/h2/mvstore/db/MVTable.java Lines 554 to 560 in 739c747
It seems suspicious to me, but this patch still apply here, I think. |
Thank you for your contribution! Please send a licence statement as described here |
Does using rebuildIndexBuffered for your example make a difference? |
thanks @grandinj to reach out! I'll send the licence statement ASAP! re
I'm sure it will because it contains
that's the key optimization to save huge arraylists to be created when no rows are found Sole problem is that even by setting a |
On current GIT master, that line of code reads
so it should work better for your case. |
@grandinj waiting subscription to the google group to be accepted and ready to send the first msg :) |
@grandinj email sent; given that this is not a huge patch I didn't add the full statement, let me know if I should, instead. |
Awesome, thanks! |
many thanks for the quick review!!! @grandinj |
Profiling https://github.com/topicusonderwijs/tribe-krd-quarkus startup it reports a huge amount of allocations due to this:
and zooming in (the orange ones are "out of TLAB allocations":
Configuration of H2 is
mem
and the ORM policy is drop and create, but still, with this PR it would save a huge amount of allocations (it's a quite large model, actually).