Skip to content

chore: attribute the old macro bottleneck to the syn parse - #408

Merged
Veetaha merged 1 commit into
masterfrom
chore/syn-parse-comment
Oct 2, 2026
Merged

Veetaha merged 1 commit into
masterfrom
chore/syn-parse-comment

Conversation

@Veetaha

@Veetaha Veetaha commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

The eager to_string() of the macro output cost only about 1% of the compile time in our benchmarks. The syn::File parse was the actual bottleneck. This PR corrects the comment from #405.

@Veetaha
Veetaha requested a balanced review from Copilot October 2, 2026 21:41
@Veetaha
Veetaha marked this pull request as ready for review October 2, 2026 21:41
@Veetaha
Veetaha merged commit 5cd0135 into master Oct 2, 2026
34 checks passed
@Veetaha
Veetaha deleted the chore/syn-parse-comment branch October 2, 2026 21:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The comment now accurately reflects the benchmark findings without changing behavior.

Review effort: Balanced
Findings: None

What changed in this PR

Corrects a performance comment to accurately identify parsing into syn::File as the former bottleneck.

Changes:

  • Removes the inaccurate claim that token-stream string conversion caused the significant slowdown.
  • Clarifies that parsing the final token stream was responsible.
File Description
bon-macros/​src/​builder/​builder_gen/​mod.rs Corrects the historical performance explanation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions github-actions Bot mentioned this pull request Oct 2, 2026
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