Skip to content

Conversation

@axelhzf
Copy link
Contributor

@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

@adamwathan
Copy link
Member

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
@adamwathan
Copy link
Member

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

adamwathan pushed a commit that referenced this pull request 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Performance problem with @apply

2 participants