-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
xds/internal/xdsclient/xdsresource: Preallocate VirtualHost slice correctly #7157
Conversation
@alingse Thanks for writing in. While this change is functional, it's generally considered more efficient in Go to set an initial length of 0 and a capacity when using make with slices that will be appended to. This change looks good to me but we need to make sure there are no other place we are using the same as above. |
@aranjans I have run |
|
It's not a style ok? It's a stupid bug @arvindbr8 have you ever really check this? @aranjans the if the |
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
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.
In the first pass, I didnt realize this was a bug fix from the PR description. This looks good to me. Thanks for catching this.
sorry for the lack of detailed description in the PR. I took the lazy way out and directly copied the description from another PR. 😿 |
when I want to add feature for linter makezero in PR ashanbrown/makezero#15 , I run a github action for real world repos, and the action result report this bug.
RELEASE NOTES: N/A