Skip to content

perf(rc): avoid calling config subscribers on duplicate values #13933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

mabdinur
Copy link
Contributor

@mabdinur mabdinur commented Jul 9, 2025

Checklist

  • PR author has checked that all the criteria below are met
  • The PR description includes an overview of the change
  • The PR description articulates the motivation for the change
  • The change includes tests OR the PR description describes a testing strategy
  • The PR description notes risks associated with the change, if any
  • Newly-added code is easy to change
  • The change follows the library release note guidelines
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Reviewer has checked that all the criteria below are met
  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Newly-added code is easy to change
  • Release note makes sense to a user of the library
  • If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

@mabdinur mabdinur requested a review from a team as a code owner July 9, 2025 22:21
@mabdinur mabdinur requested a review from erikayasuda July 9, 2025 22:21
Copy link
Contributor

github-actions bot commented Jul 9, 2025

CODEOWNERS have been resolved as:

ddtrace/settings/_config.py                                             @DataDog/apm-core-python
tests/internal/test_settings.py                                         @DataDog/apm-core-python

Copy link
Contributor

github-actions bot commented Jul 9, 2025

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 282 ± 5 ms.

The average import time from base is: 289 ± 8 ms.

The import time difference between this PR and base is: -7.5 ± 0.3 ms.

Import time breakdown

The following import paths have shrunk:

ddtrace.auto 2.483 ms (0.88%)
ddtrace.bootstrap.sitecustomize 1.788 ms (0.63%)
ddtrace.bootstrap.preload 1.788 ms (0.63%)
ddtrace.internal.remoteconfig.client 0.791 ms (0.28%)
ddtrace 0.695 ms (0.25%)
ddtrace.internal._unpatched 0.035 ms (0.01%)
json 0.035 ms (0.01%)
json.decoder 0.035 ms (0.01%)
re 0.035 ms (0.01%)
enum 0.035 ms (0.01%)
types 0.035 ms (0.01%)

@mabdinur mabdinur changed the title perf(rc): avoid call subscriber on duplicate values perf(rc): avoid calling config subscribers on duplicate values Jul 9, 2025
@mabdinur mabdinur force-pushed the munir/avoid-calling-subscriber-on-duplicate-calls branch from aa61b3f to a67f6b1 Compare July 9, 2025 23:24
@pr-commenter
Copy link

pr-commenter bot commented Jul 10, 2025

Benchmarks

Benchmark execution time: 2025-07-14 20:21:17

Comparing candidate commit aeb38cf in PR branch munir/avoid-calling-subscriber-on-duplicate-calls with baseline commit df60cba in branch main.

Found 0 performance improvements and 1 performance regressions! Performance is the same for 405 metrics, 2 unstable metrics.

scenario:iastaspectsospath-ospathnormcase_aspect

  • 🟥 execution_time [+428.419ns; +490.942ns] or [+12.121%; +13.890%]

@rachelyangdog rachelyangdog self-requested a review July 10, 2025 00:33
@mabdinur mabdinur enabled auto-merge (squash) July 10, 2025 19:40
@mabdinur mabdinur added changelog/no-changelog A changelog entry is not required for this PR. and removed changelog/no-changelog A changelog entry is not required for this PR. labels Jul 11, 2025
@mabdinur mabdinur force-pushed the munir/avoid-calling-subscriber-on-duplicate-calls branch from 1354bad to a7da8e6 Compare July 11, 2025 15:29
@mabdinur mabdinur force-pushed the munir/avoid-calling-subscriber-on-duplicate-calls branch from a7da8e6 to 1f365e8 Compare July 11, 2025 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog A changelog entry is not required for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants