Skip to content

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
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release and removed 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 19, 2025
@thePunderWoman
Copy link
Contributor

This PR was merged into the repository by commit b785256.

The changes were merged into the following branches: main

@angular-automatic-lock-bot
Copy link

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 Jun 19, 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: core Issues related to the framework runtime area: performance Issues related to performance target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants