-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 @tailwindcss/postcss
performance for initial builds
#14565
Commits on Oct 1, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 73db06f - Browse repository at this point
Copy the full SHA 73db06fView commit details -
Configuration menu - View commit details
-
Copy full SHA for bcf4b2c - Browse repository at this point
Copy the full SHA bcf4b2cView commit details -
remove unnecessary
async/await
I am not 100% sure, but I believe this gets rid of at least 1 macroTask.
Configuration menu - View commit details
-
Copy full SHA for c26397a - Browse repository at this point
Copy the full SHA c26397aView commit details -
only setup a new compiler if we need to
Otherwise it means that we: 1. Setup 2 compilers for an initial build 2. The second time we clear require caches which means that _everything_ will be loaded from scratch.
Configuration menu - View commit details
-
Copy full SHA for 5db16ab - Browse repository at this point
Copy the full SHA 5db16abView commit details -
Configuration menu - View commit details
-
Copy full SHA for af755a8 - Browse repository at this point
Copy the full SHA af755a8View commit details -
use a Set to make files unique
During debugging I noticed that some of the files were in the list multiple times, using a Set solves that issues. While this is a little band-aid it helps for now. Following commits will include a more proper fix.
Configuration menu - View commit details
-
Copy full SHA for b68f643 - Browse repository at this point
Copy the full SHA b68f643View commit details -
hoist the cache to the module level
During debugging, I noticed that every time the PostCSS code runs, the full plugin re-runs. This means that caches are thrown away. I'm currently not sure if this is a test specific issue or an actual issue. That said, the integration tests do run postcss-cli for example directly so I think this is a real issue. This change should be safe since the cache is unique per input file (which it was before as well). Worst case is that we use a bit more memory.
Configuration menu - View commit details
-
Copy full SHA for dd6b52d - Browse repository at this point
Copy the full SHA dd6b52dView commit details -
the
resolvedPath
is already part of themoduleDependencies
Removing this means that the main file (e.g.: `tailwind.config.js`) is only in the list once. This also means that we only have to register it as a PostCSS dependency and it also means that we will `fs.stat` the file once.
Configuration menu - View commit details
-
Copy full SHA for 7538847 - Browse repository at this point
Copy the full SHA 7538847View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c1a873 - Browse repository at this point
Copy the full SHA 0c1a873View commit details
Commits on Oct 2, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 687ef2a - Browse repository at this point
Copy the full SHA 687ef2aView commit details -
Configuration menu - View commit details
-
Copy full SHA for b8b1e92 - Browse repository at this point
Copy the full SHA b8b1e92View commit details -
Configuration menu - View commit details
-
Copy full SHA for 60ad1d6 - Browse repository at this point
Copy the full SHA 60ad1d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7d5b5e6 - Browse repository at this point
Copy the full SHA 7d5b5e6View commit details -
There’ve been some improvements in compatibility and perf in a few of them
Configuration menu - View commit details
-
Copy full SHA for e738f8a - Browse repository at this point
Copy the full SHA e738f8aView commit details
Commits on Oct 3, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 15bf21b - Browse repository at this point
Copy the full SHA 15bf21bView commit details -
Configuration menu - View commit details
-
Copy full SHA for dfb0d7b - Browse repository at this point
Copy the full SHA dfb0d7bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6ea41a6 - Browse repository at this point
Copy the full SHA 6ea41a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for bd52e6b - Browse repository at this point
Copy the full SHA bd52e6bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 93f5c9f - Browse repository at this point
Copy the full SHA 93f5c9fView commit details