Open

Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
Building our NX monorepo, particularly when utilizing M3 material components at runtime, is experiencing noticeable delays. This slowdown in compilation time is impacting our development efficiency.
Without M3, the compilation process takes approximately 2 seconds. However, with M3 integrated, the compilation time extends to 40 seconds or more.
Reproduction
StackBlitz link:
Steps to reproduce:
1.
2.
Expected Behavior
.
Actual Behavior
.
Environment
- Angular: v18.0.0-rc.0
- CDK/Material: v18.0.0-rc.0
- Browser(s): chrome
- Operating System (e.g. Windows, macOS, Ubuntu): mac
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
crisbeto commentedon May 6, 2024
I believe that Nx uses some sort of build caching. Do you see these slowdowns consistently or only on the initial build? Also what changes did you make to enable M3? We export all the APIs through the same
_index.scss
so I would expect the build graph to look identical no matter what version of Material you're using.ghost commentedon May 6, 2024
@crisbeto
slowdown is consistent
Nx 18, 19
Angular 18 rc 0 even with experimental 17 package
before m3 and after m3 build times and runtimes doubled up
crisbeto commentedon May 7, 2024
Can you also post what your theme looked like for M2?
perf(material/core): speed up M3 compilation
perf(material/core): speed up M3 compilation
crisbeto commentedon May 7, 2024
I've sent out #29009 which seems to cut the compilation time at least in half for M3.
9 remaining items