Skip to content

[perf][o11y] Avoid another event-level memory allocation when internal tracing is not being used#5586

Merged
fhanau merged 1 commit intomainfrom
felix/112525-o11y-perf
Dec 11, 2025
Merged

[perf][o11y] Avoid another event-level memory allocation when internal tracing is not being used#5586
fhanau merged 1 commit intomainfrom
felix/112525-o11y-perf

Conversation

@fhanau
Copy link
Copy Markdown
Contributor

@fhanau fhanau commented Nov 25, 2025

No description provided.

@fhanau fhanau requested review from jasnell and mar-cf November 25, 2025 18:45
@fhanau fhanau requested review from a team as code owners November 25, 2025 18:45
Copy link
Copy Markdown
Contributor

@mar-cf mar-cf left a comment

Choose a reason for hiding this comment

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

"no tracing" should explicitly represented as kj::none rather than a fake object that silently does nothing. Is there a reason not to do that?

@fhanau fhanau force-pushed the felix/112525-o11y-perf branch from f3f22ec to eb812f9 Compare December 10, 2025 19:08
@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 10, 2025

The generated output of @cloudflare/workers-types matches the snapshot in types/generated-snapshot 🎉

@fhanau fhanau force-pushed the felix/112525-o11y-perf branch from eb812f9 to 8802ce1 Compare December 10, 2025 19:30
@fhanau
Copy link
Copy Markdown
Contributor Author

fhanau commented Dec 10, 2025

"no tracing" should explicitly represented as kj::none rather than a fake object that silently does nothing. Is there a reason not to do that?

Discussed out-of-band – for now this PR gets rid of one allocation, I created issue EW-9829 to explore not setting up a trace scope at all at a future time.

@fhanau fhanau force-pushed the felix/112525-o11y-perf branch from 8802ce1 to 4fd4951 Compare December 11, 2025 00:19
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Dec 11, 2025

CodSpeed Performance Report

Merging #5586 will improve performances by 12.88%

Comparing felix/112525-o11y-perf (4fd4951) with main (c766f38)

Summary

⚡ 1 improvement
✅ 56 untouched
⏩ 30 skipped1

Benchmarks breakdown

Benchmark BASE HEAD Change
Encode_ASCII_32[TextEncoder][0/0/32] 3.4 ms 3 ms +12.88%

Footnotes

  1. 30 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@fhanau fhanau merged commit b8755c7 into main Dec 11, 2025
20 of 22 checks passed
@fhanau fhanau deleted the felix/112525-o11y-perf branch December 11, 2025 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants