Skip to content

Conversation

realFlowControl
Copy link
Member

@realFlowControl realFlowControl commented Sep 8, 2025

Description

All this PR does is extract the global offset table manipulation code into it's own file

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@github-actions github-actions bot added profiling Relates to the Continuous Profiler tracing labels Sep 8, 2025
@codecov-commenter
Copy link

codecov-commenter commented Sep 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.86%. Comparing base (9298487) to head (77a818c).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3406      +/-   ##
==========================================
- Coverage   61.89%   61.86%   -0.03%     
==========================================
  Files         141      141              
  Lines       12501    12501              
  Branches     1633     1633              
==========================================
- Hits         7737     7734       -3     
- Misses       4042     4045       +3     
  Partials      722      722              

see 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9298487...77a818c. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pr-commenter
Copy link

pr-commenter bot commented Sep 8, 2025

Benchmarks [ profiler ]

Benchmark execution time: 2025-10-15 11:34:15

Comparing candidate commit 77a818c in PR branch florian/cleanup with baseline commit 9298487 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 28 metrics, 8 unstable metrics.

@realFlowControl realFlowControl marked this pull request as ready for review October 7, 2025 09:50
@realFlowControl realFlowControl requested a review from a team as a code owner October 7, 2025 09:50
realFlowControl and others added 4 commits October 14, 2025 16:53
Reduces CPU overhead by checking stable_config availability once before
the main loop instead of on every config entry/name iteration. This
eliminates hundreds of redundant NULL checks per request.

Adds zai_config_stable_file_is_available() to avoid repeated function
calls and NULL checks inside the hot loop.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Restructured conditional chains to separate strcpy side effects from
boolean checks. This improves code clarity and makes the control flow
more explicit. The strcpy is now only executed after the source type
check passes, maintaining the same performance characteristics while
improving maintainability.

Changed from chained && expressions with strcpy side effects to
nested if statements with clear separation of concerns.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Adds an early continue for config entries that have names_count == 0,
avoiding unnecessary processing and conditional checks for entries that
cannot have any configuration values.

This reduces loop overhead by skipping empty entries entirely instead
of entering the inner loop and immediately exiting.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Modified zai_config_process_runtime_env to accept a length parameter
instead of calling strlen(buf.ptr) for every config value. When we
copy from zend_string sources, we now use ZSTR_LEN to get the length
directly, eliminating redundant strlen calls on every iteration.

This optimization is particularly effective for the stable config
paths (FLEET and LOCAL) where we already have the string length from
the zend_string structure.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@realFlowControl realFlowControl requested a review from a team as a code owner October 15, 2025 11:20
@pr-commenter
Copy link

pr-commenter bot commented Oct 15, 2025

Benchmarks [ tracer ]

Benchmark execution time: 2025-10-15 12:25:59

Comparing candidate commit 77a818c in PR branch florian/cleanup with baseline commit 9298487 in branch master.

Found 1 performance improvements and 4 performance regressions! Performance is the same for 188 metrics, 1 unstable metrics.

scenario:MessagePackSerializationBench/benchMessagePackSerialization

  • 🟥 execution_time [+5.526µs; +7.734µs] or [+5.529%; +7.738%]

scenario:SamplingRuleMatchingBench/benchRegexMatching2

  • 🟥 execution_time [+52.451ns; +130.949ns] or [+4.416%; +11.025%]

scenario:SamplingRuleMatchingBench/benchRegexMatching3

  • 🟥 execution_time [+53.355ns; +118.845ns] or [+4.457%; +9.929%]

scenario:SpanBench/benchOpenTelemetryAPI

  • 🟥 mem_peak [+1.323MB; +1.352MB] or [+3.173%; +3.243%]

scenario:TraceSerializationBench/benchSerializeTrace

  • 🟩 execution_time [-35.636µs; -19.164µs] or [-8.070%; -4.340%]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

profiling Relates to the Continuous Profiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants