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
Slightly speed up scripts #68478
Slightly speed up scripts #68478
Conversation
This saves a couple of nanoseconds on ever invocation of a painless script that uses `SearchLookup`. Which is most of the scripts in the hot path. This amounts to a 3.5% performance savings for things like script scoring and runtime fields. We got this by speeding up a method that the async profiler reported as taking 20% of the time running a script score with painless. This drops it to 1%. You'd think that'd result in a 19% speed up. But no such luck.
Pinging @elastic/es-search (Team:Search) |
The actual speedup from this is pretty disappointing. The async profiler has betrayed me! But its a very very easy change so I figure its worth it. |
Benchmarks just finished: Before:
After:
Like I said - its a small improvement for painless scripts. But its a small change. |
The async profiler led me to believe it'd be a bigger improvement or else I wouldn't even have looked. But still. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This saves a couple of nanoseconds on ever invocation of a painless script that uses `SearchLookup`. Which is most of the scripts in the hot path. This amounts to a 3.5% performance savings for things like script scoring and runtime fields. We got this by speeding up a method that the async profiler reported as taking 20% of the time running a script score with painless. This drops it to 1%. You'd think that'd result in a 19% speed up. But no such luck.
This saves a couple of nanoseconds on ever invocation of a painless script that uses `SearchLookup`. Which is most of the scripts in the hot path. This amounts to a 3.5% performance savings for things like script scoring and runtime fields. We got this by speeding up a method that the async profiler reported as taking 20% of the time running a script score with painless. This drops it to 1%. You'd think that'd result in a 19% speed up. But no such luck.
This saves a couple of nanoseconds on ever invocation of a painless script that uses `SearchLookup`. Which is most of the scripts in the hot path. This amounts to a 3.5% performance savings for things like script scoring and runtime fields. We got this by speeding up a method that the async profiler reported as taking 20% of the time running a script score with painless. This drops it to 1%. You'd think that'd result in a 19% speed up. But no such luck.
This saves a couple of nanoseconds on ever invocation of a painless
script that uses
SearchLookup
. Which is most of the scripts in the hotpath. This amounts to a 3.5% performance savings for things like script
scoring and runtime fields. We got this by speeding up a method that the
async profiler reported as taking 20% of the time running a script score
with painless. This drops it to 1%. You'd think that'd result in a 19%
speed up. But no such luck.