Skip to content

fix(core): Explicitly manage TracingSnapshot lifecycle and dispose of it once it's been used.#58929

Closed
arielbackenroth wants to merge 1 commit intoangular:mainfrom
arielbackenroth:dispose
Closed

fix(core): Explicitly manage TracingSnapshot lifecycle and dispose of it once it's been used.#58929
arielbackenroth wants to merge 1 commit intoangular:mainfrom
arielbackenroth:dispose

Conversation

@arielbackenroth
Copy link
Copy Markdown
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

Fix for tracing service to explicitly manage lifecycle

  • [X ] Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Currently our experimental implementation of this service fails because it attempts to run snapshots that have been previously resumed. Need to explicitly manage releasing ref counts and enable snapshots to be used multiple times.

Issue Number: N/A

What is the new behavior?

Have Angular explicitly call dispose to release resources (refcounts) by the tracing.

Does this PR introduce a breaking change?

  • Yes
  • [ X] No

Other information

@google-cla
Copy link
Copy Markdown

google-cla bot commented Nov 27, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@pullapprove pullapprove bot requested a review from alxhub November 27, 2024 12:54
@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Nov 27, 2024
@ngbot ngbot bot added this to the Backlog milestone Nov 27, 2024
@crisbeto crisbeto requested review from crisbeto and removed request for alxhub November 27, 2024 13:36
@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Nov 27, 2024
@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Nov 27, 2024
@ngbot ngbot bot modified the milestone: Backlog Nov 27, 2024
@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Nov 27, 2024
@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Nov 27, 2024
@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Nov 27, 2024
@ngbot ngbot bot modified the milestone: Backlog Nov 27, 2024
@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Nov 27, 2024
@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Nov 27, 2024
@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Nov 27, 2024
… it once it's been used.

Provide a callback to the TracingService implementation when a Snapshot can be disposed.
The underlying tracing implementation may use refcounting and needs to release resources
to enable the trace to complete.

While change detection uses the snapshot for exactly one callback, after render runs
multiple hooks in the sequence so we need a more predictable way to indicate that the snapshot
can be finalized.s
@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Nov 27, 2024
@ngbot ngbot bot modified the milestone: Backlog Nov 27, 2024
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Nov 27, 2024
@pkozlowski-opensource
Copy link
Copy Markdown
Member

This PR was merged into the repository by commit 3b76536.

The changes were merged into the following branches: main, 19.0.x

pkozlowski-opensource pushed a commit that referenced this pull request Nov 27, 2024
… it once it's been used. (#58929)

Provide a callback to the TracingService implementation when a Snapshot can be disposed.
The underlying tracing implementation may use refcounting and needs to release resources
to enable the trace to complete.

While change detection uses the snapshot for exactly one callback, after render runs
multiple hooks in the sequence so we need a more predictable way to indicate that the snapshot
can be finalized.s

PR Close #58929
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants