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

Improve @apply performance #3718

merged 2 commits into from Apr 30, 2021


Copy link

@axelhzf axelhzf commented Mar 9, 2021

Fix #3717

This is an attempt to improve the performance of using @apply.

As you can see on this profile, a lot of time is wasted on the buildUtilityMap function.

Captura de pantalla 2021-03-09 a las 13 49 04

This PR tries to reduce the work done by this function by memoizing the static part

You can see the difference with this profile (with this patch applied)

Captura de pantalla 2021-03-09 a las 14 36 31

Copy link

adamwathan commented Mar 27, 2021

Haven't had a chance to look at this in depth yet but just wanted to follow up anyways and say thank you! We don't get PRs that touch stuff this deep very often so I really appreciate you digging in 🙏 Will get to this soon!

@adamwathan adamwathan merged commit fbc0f2f into tailwindlabs:master Apr 30, 2021
2 checks passed
Copy link

adamwathan commented Apr 30, 2021

Thanks for this, will try to get it out in a patch soon!

adamwathan pushed a commit that referenced this issue May 7, 2021
* Split the buildUtilityMap function to memoize the static part

* fix tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

2 participants