[v19 backport] fix(core): reduce total memory usage of various migration schematics #60776
Closed
JoostK wants to merge 2 commits intoangular:19.2.xfrom
Closed
[v19 backport] fix(core): reduce total memory usage of various migration schematics #60776JoostK wants to merge 2 commits intoangular:19.2.xfrom
JoostK wants to merge 2 commits intoangular:19.2.xfrom
Conversation
…the CLI (angular#60386) Currently when we reuse a Tsurge migration is reused externally, there's some glue code that needs to be executed in a specific order. The code gets copied between the different migrations which is error-prone and means that bugs may have to be fixed several times. These changes move the common steps out into a separate function so that only the migration-specific logic (mostly instantiation and logging) is left in the schematic. PR Close angular#60386
This commit changes Tsurge's operation within angular-devkit (i.e. the CLI) to no longer retain all programs across all migrations. This isn't necessary for so-called "funnel" migrations so not retaining the programs for those migrations is a pure performance win. The "complex" migrations may see increased execution time given that the program is now being recreated for the actual migration phase to run, although reduced memory pressure may help alleviate this overhead. Since this new approach should help prevent Node from running out of memory and failing entirely this is preferred over a potentially increased execution time. Fixes angular#59813
crisbeto
previously approved these changes
Apr 7, 2025
Member
Author
|
I'm AFK at the moment and don't quite see why this is failing the way it does, but I haven't ran the tests locally assuming the cherry-picks would stick (there were no meaningful conflicts except for one file addition). Will look again tomorrow. |
Member
|
The breakage was unrelated and fixed by #60753. |
67a547b to
eb672b9
Compare
atscott
approved these changes
Apr 8, 2025
atscott
pushed a commit
that referenced
this pull request
Apr 8, 2025
…the CLI (#60386) (#60776) Currently when we reuse a Tsurge migration is reused externally, there's some glue code that needs to be executed in a specific order. The code gets copied between the different migrations which is error-prone and means that bugs may have to be fixed several times. These changes move the common steps out into a separate function so that only the migration-specific logic (mostly instantiation and logging) is left in the schematic. PR Close #60386 PR Close #60776
atscott
pushed a commit
that referenced
this pull request
Apr 8, 2025
…60776) This commit changes Tsurge's operation within angular-devkit (i.e. the CLI) to no longer retain all programs across all migrations. This isn't necessary for so-called "funnel" migrations so not retaining the programs for those migrations is a pure performance win. The "complex" migrations may see increased execution time given that the program is now being recreated for the actual migration phase to run, although reduced memory pressure may help alleviate this overhead. Since this new approach should help prevent Node from running out of memory and failing entirely this is preferred over a potentially increased execution time. Fixes #59813 PR Close #60776
Contributor
|
This PR was merged into the repository by commit 9241615. The changes were merged into the following branches: 19.2.x |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is cherry-picking #60386 and #60774 to the patch branch for v19.
Closes #59813