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
Cache TableRecord Constructor in TableImpl for use in Tools.recordFactory() #6639
Comments
This may as well have been a safepoint artifact from the profiling session. I've never noticed this again since. |
Ah, the difference is that in the original screenshot, the But now we're looking into a benchmark where Perhaps, a generated |
I've tried caching the |
Attaching the cached Before
After
Roughly 5% better on |
In fact, this improves any usage of |
Currently, when creating
TableRecord
in result queries, the record is instanciated using reflection, which allows for creating records from private constructors, too.However, this constructor is looked up every single time, instead of it being cached:
In a profiling session running 1M queries, this accounts for 0.85% of the samples, so it's definitely worth optimising:
The text was updated successfully, but these errors were encountered: