Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5bc83196b2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if tool.StatusCode != 0 { | ||
| b.Fatalf("parser status: %d", tool.StatusCode) | ||
| } | ||
| runtime.KeepAlive(stdout) |
There was a problem hiding this comment.
Release the discovery buffer before parsing
When this benchmark is used to characterize Make-discovery peak memory, runtime.KeepAlive(stdout) forces the entire 10–500 MiB backing buffer to remain reachable throughout tool.Parse. The production runDiscoveryMake path stops using stdoutBuf after scanBuildLog, and bufio.Scanner.Text copies each token, so the buffer can be collected during parsing; retaining it here inflates the reported RSS and can mask memory improvements. Remove this keepalive or otherwise match the production object's lifetime.
Useful? React with 👍 / 👎.
No description provided.