8000 perf(core): avoid intermediate arrays in definition by crisbeto · Pull Request #61445 · angular/angular · GitHub
[go: up one dir, main page]

Skip to content

perf(core): avoid intermediate arrays in definition #61445

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 occasion 8000 ally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

crisbeto
Copy link
Member
@crisbeto crisbeto commented May 17, 2025

A minor performance improvement for ɵɵdefineComponent where the underlying extractDefListOrFactory call had a chain of .map.filter which meant that we were unnecessarily creating intermediate arrays just to filter out the null values. These changes switch to simple for loop to get around it.

@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels May 17, 2025
@angular-robot angular-robot bot added area: performance Issues related to performance area: core Issues related to the framework runtime labels May 17, 2025
@ngbot ngbot bot added this to the Backlog milestone May 17, 2025
A minor performance improvement for `ɵɵdefineComponent` where the underlying `extractDefListOrFactory` call had a chain of `.map.filter` which meant that we were unnecessarily creating intermediate arrays just to filter out the null values. These changes switch to simple `for` loop to get around it.
@crisbeto crisbeto force-pushed the def-flatten-array branch from e084ced to d5abf63 Compare May 17, 2025 11:22
@crisbeto crisbeto changed the title perf(core): avoid intermediate arrays and callbacks in definition perf(core): avoid intermediate arrays in definition May 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: review The PR is still awaiting reviews from at least one requested reviewer area: core Issues related to the framework runtime 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.

1 participant
0