-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Make fingerprinting faster #36073
Make fingerprinting faster #36073
Conversation
By using a buffer of the fingerprint's size. This descreases the amount of syscalls for reading the file. Also added the benchmark for tracking the function's performance.
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
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
By using a buffer of the fingerprint's size. This descreases the amount of syscalls for reading the file. Also added the benchmark for tracking the function's performance. (cherry picked from commit 061cb88)
By using a buffer of the fingerprint's size. This descreases the amount of syscalls for reading the file. Also added the benchmark for tracking the function's performance. (cherry picked from commit 061cb88) Co-authored-by: Denis <[email protected]>
By using a buffer of the fingerprint's size. This descreases the amount of syscalls for reading the file. Also added the benchmark for tracking the function's performance.
What does this PR do?
By using a buffer of the fingerprint's size. This descreases the amount of syscalls for reading the file.
Also added the benchmark for tracking the function's performance.
Benchmark results
Before (avg. ~22917 ns/op)
After (avg. ~15501 ns/op)
Performance gain is ~32%
Why is it important?
Who does not like performance improvements?
Checklist
- [ ] I have made corresponding changes to the documentation- [ ] I have made corresponding change to the default configuration files- [ ] I have added an entry inCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
Related issues
fingerprint
file identity #35734