Skip to content
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

Do not force cycle collection at runtime on flush by default #2046

Merged
merged 1 commit into from
May 11, 2023

Conversation

bwoebi
Copy link
Collaborator

@bwoebi bwoebi commented May 11, 2023

Description

We had an user where it massively impacted their performance: And practically it should rarely make a difference (it only matters with autoflush active and forgetting to close all of a stacks spans and GC running next to never in a long running script. But if it does delay traces from arriving, there's an escape hatch configuration option.

Readiness checklist

  • (only for Members) Changelog has been added to the release document.
  • Tests added for this feature/bug. Performance issue rather.

Reviewer checklist

  • Appropriate labels assigned.
  • Milestone is set.
  • Changelog has been added to the release document. For community contributors the reviewer is in charge of this task.

Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
@bwoebi bwoebi added this to the 0.87.0 milestone May 11, 2023
@bwoebi bwoebi requested a review from a team as a code owner May 11, 2023 10:38
Comment on lines -676 to +675
// We need to loop here, as closing the last span root stack could add other spans here
while (DDTRACE_G(top_closed_stack)) {
if (DDTRACE_G(top_closed_stack)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

question: Is this comment not true anymore and is this related to not calling a garbage collection cycle?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, that's related to the garbage collection. The code in this function does not have any side effects by itself.

@bwoebi bwoebi merged commit b424086 into master May 11, 2023
458 of 474 checks passed
@bwoebi bwoebi deleted the bob/less-cycle-collection branch May 11, 2023 13:07
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.

None yet

2 participants