Skip to content

opentelemetry-sdk: update iterator for BoundedList#5297

Open
codeboten wants to merge 4 commits into
open-telemetry:mainfrom
codeboten:codeboten/remove-deque-in-iterator
Open

opentelemetry-sdk: update iterator for BoundedList#5297
codeboten wants to merge 4 commits into
open-telemetry:mainfrom
codeboten:codeboten/remove-deque-in-iterator

Conversation

@codeboten

@codeboten codeboten commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Description

Return the list of keys instead of a copy of the BoundedList in a deque.

Type of change

Please delete options that are not relevant.

  • small perf improvement

How Has This Been Tested?

Ran the benchmark 10x and got the following output:

Type Items CPU Before (µs) CPU After (µs) CPU Δ Mem Before (B) Mem After (B) Mem Δ
events 1 6.0 6.0 -1.0% 1,580 964 -39.0%
events 10 16.2 16.1 -0.4% 1,708 964 -43.6%
events 50 61.1 61.1 -0.0% 1,996 1,140 -42.9%
events 128 149.3 149.0 -0.2% 3,660 2,372 -35.2%
links 1 5.6 5.4 -2.5% 1,580 964 -39.0%
links 10 12.0 12.1 +0.5% 1,708 964 -43.6%
links 50 41.4 41.1 -0.6% 1,996 1,140 -42.9%
links 128 98.7 100.2 +1.5% 3,660 2,372 -35.2%

Does This PR Require a Contrib Repo Change?

  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Benchmark tests have been updated
  • Documentation has been updated

Return the list of keys instead of a copy of the BoundedList in a deque.

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
@codeboten codeboten marked this pull request as ready for review June 12, 2026 23:25
@codeboten codeboten requested a review from a team as a code owner June 12, 2026 23:25
@github-project-automation github-project-automation Bot moved this to Approved PRs in Python PR digest Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Approved PRs

Development

Successfully merging this pull request may close these issues.

2 participants