-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix: optimize performance of process.OpenFiles() #1866
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
Conversation
@Dainerx You can use the draft PR to test for now. I just find another point to optmize, and will let you know after submitting code. |
86c6e99
to
9fa1f08
Compare
Is it good and necessary to provide an iterator method for |
The Iterator is not necessary. However, since Go 1.23 —where Iterator was introduced— is the oldest Go version we support, it’s fine to use it, I think. |
2fcecb5
to
9dcddfe
Compare
@shirou Please merge the PR if you think everything is ok. |
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.
A slight change can now be made to speed up the process considerably. It is an amazing achievement. Thank you very much.
I have one comment to more optimization. It is not necessary but just an idea.
I just implemented the idea. BTW, which tool do you use to geneerate the detailed benchmark? |
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.
Awesome! This should improve performance. I really appreciate your contribution.
The tool I used is benchstat. It simply makes benchmark results easier to read.
fixes #1781