Skip to content
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 occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(material/core): speed up M3 compilation #29009

Merged
merged 1 commit into from May 7, 2024

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented May 7, 2024

Mitigates a compile time regression when generating M3 themes. These changes reduce the compilation time in half by caching the dummy theme instead of recreating it for each invocation. We can get away with this since the dummy theme is constant.

Although these changes are a significant improvement, there's more room for improvement. Timings for reference:

At head:

M2 benchmark - 35s
M3 benchmark - 90s
Theme from #28971 - 19s

After these changes changes:

M2 benchmark - 36s
M3 benchmark - 56s
Theme from #28971 - 10s

Relates to #28971.

@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label May 7, 2024
@crisbeto crisbeto requested a review from mmalerba as a code owner May 7, 2024 09:59
Mitigates a compile time regression when generating M3 themes. These changes reduce the compilation time in half by caching the dummy theme instead of recreating it for each invocation. We can get away with this since the dummy theme is constant.

Although these changes are a significant improvement, there's more room for improvement. Timings for reference:

At head:
```
M2 benchmark - 35s
M3 benchmark - 90s
Theme from angular#28971 - 19s
```

After these changes changes:
```
M2 benchmark - 36s
M3 benchmark - 56s
Theme from angular#28971 - 10s
```

Relates to angular#28971.
@crisbeto crisbeto self-assigned this May 7, 2024
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker target: rc This PR is targeted for the next release-candidate and removed target: patch This PR is targeted for the next patch release labels May 7, 2024
@crisbeto crisbeto merged commit 0188516 into angular:main May 7, 2024
24 of 28 checks passed
crisbeto added a commit that referenced this pull request May 7, 2024
Mitigates a compile time regression when generating M3 themes. These changes reduce the compilation time in half by caching the dummy theme instead of recreating it for each invocation. We can get away with this since the dummy theme is constant.

Although these changes are a significant improvement, there's more room for improvement. Timings for reference:

At head:
```
M2 benchmark - 35s
M3 benchmark - 90s
Theme from #28971 - 19s
```

After these changes changes:
```
M2 benchmark - 36s
M3 benchmark - 56s
Theme from #28971 - 10s
```

Relates to #28971.

(cherry picked from commit 0188516)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker target: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants