Skip to content

refactor(animations): optimize resolveTimeExpression#62927

Closed
amilajack wants to merge 3 commits intoangular:mainfrom
amilajack:patch-1
Closed

refactor(animations): optimize resolveTimeExpression#62927
amilajack wants to merge 3 commits intoangular:mainfrom
amilajack:patch-1

Conversation

@amilajack
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?

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

n/a

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

From our profiling data, we see cloakAndComputeStyles indirectly invokes parseTimeExpression in a loop, making it a hot path in our app. This is a pass at optimizing it.

@pullapprove pullapprove bot requested a review from devversion July 31, 2025 17:52
Copy link
Copy Markdown
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

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

LGTM, but can you please fix the commit message?

@angular-robot angular-robot bot added the area: performance Issues related to performance label Aug 6, 2025
@ngbot ngbot bot added this to the Backlog milestone Aug 6, 2025
@angular-robot angular-robot bot added the area: animations legacy animations package only. Otherwise use area: core. label Aug 6, 2025
@amilajack amilajack changed the title optimize resolveTimeExpression perf(animations): optimize resolveTimeExpression Aug 6, 2025
@amilajack
Copy link
Copy Markdown
Contributor Author

updated the pr title and commit msg

@JeanMeche JeanMeche added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Aug 6, 2025
This moves a regexp expression into a const to optimize performance.
@thePunderWoman thePunderWoman changed the title perf(animations): optimize resolveTimeExpression refactor(animations): optimize resolveTimeExpression Aug 6, 2025
@thePunderWoman thePunderWoman added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Aug 6, 2025
@crisbeto
Copy link
Copy Markdown
Member

crisbeto commented Aug 6, 2025

This PR was merged into the repository by commit ec8cd3e.

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

crisbeto pushed a commit that referenced this pull request Aug 6, 2025
This moves a regexp expression into a const to optimize performance.

PR Close #62927
@crisbeto crisbeto closed this in ec8cd3e Aug 6, 2025
@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 Sep 6, 2025
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: animations legacy animations package only. Otherwise use area: core. area: performance Issues related to performance target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants