refactor(core): use version>0 instead of hasRun by milomg · Pull Request #62467 · angular/angular · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

refactor(core): use version>0 instead of hasRun #62467

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

milomg
Copy link
Contributor

@milomg milomg commented Jul 4, 2025

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • 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?

Issue Number: N/A

What is the new behavior?

This saves a field for effect and watch nodes. Additionally, it should make effect nodes flash in the devtools when they rerun.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

this saves a field for effect and watch nodes
@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Jul 4, 2025
@ngbot ngbot bot added this to the Backlog milestone Jul 4, 2025
return;
}
this.hasRun = true;
this.version++;
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess setting a value to true will be cheaper memory wise, as there would be no need to allocate memory for each new value that ++ generates, while the boolean flag only allocates memory once, and uses that memory location.

Copy link
Member

Choose a reason for hiding this comment

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

It's just a number though (fixed 64 bit), It shouldn't really matter ?

Copy link
Contributor

Choose a reason for hiding this comment

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

This has to go through the perf benchmarks I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues related to the framework runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.