Skip to content

Minor optimization for allocating blob buffer.#308

Merged
Chounoki merged 3 commits intoopenconfig:mainfrom
Chounoki:main
May 1, 2026
Merged

Minor optimization for allocating blob buffer.#308
Chounoki merged 3 commits intoopenconfig:mainfrom
Chounoki:main

Conversation

@Chounoki
Copy link
Copy Markdown
Contributor

No description provided.

@Chounoki Chounoki requested review from gmacf and seal6363 April 23, 2026 08:16
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces a hardcoded buffer size with a dynamic calculation using binary.Size for the TPM_ASYM_CA_CONTENTS structure. Feedback suggests that this change introduces unnecessary runtime reflection for a fixed-size struct, which is a performance regression compared to the original constant expression. It is recommended to revert to the previous allocation method or use a defined constant.

Comment thread server/service/service.go
@Chounoki Chounoki merged commit a86ccdf into openconfig:main May 1, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants