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 @tailwindcss/postcss performance for initial builds #14565

Merged
merged 19 commits into from
Oct 3, 2024

Commits on Oct 1, 2024

  1. Configuration menu
    Copy the full SHA
    73db06f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bcf4b2c View commit details
    Browse the repository at this point in the history
  3. remove unnecessary async/await

    I am not 100% sure, but I believe this gets rid of at least 1 macroTask.
    RobinMalfait committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    c26397a View commit details
    Browse the repository at this point in the history
  4. 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.
    RobinMalfait committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    5db16ab View commit details
    Browse the repository at this point in the history
  5. update changelog

    RobinMalfait committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    af755a8 View commit details
    Browse the repository at this point in the history
  6. 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.
    RobinMalfait committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    b68f643 View commit details
    Browse the repository at this point in the history
  7. 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.
    RobinMalfait committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    dd6b52d View commit details
    Browse the repository at this point in the history
  8. the resolvedPath is already part of the moduleDependencies

    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.
    RobinMalfait committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    7538847 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    0c1a873 View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2024

  1. Configuration menu
    Copy the full SHA
    687ef2a View commit details
    Browse the repository at this point in the history
  2. wip use quick lru

    philipp-spiess committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    b8b1e92 View commit details
    Browse the repository at this point in the history
  3. Upgrade ignore crate

    philipp-spiess committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    60ad1d6 View commit details
    Browse the repository at this point in the history
  4. Bump napi to latest

    thecrypticace committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    7d5b5e6 View commit details
    Browse the repository at this point in the history
  5. Bump rust deps

    There’ve been some improvements in compatibility and perf in a few of them
    thecrypticace committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    e738f8a View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2024

  1. Configuration menu
    Copy the full SHA
    15bf21b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dfb0d7b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6ea41a6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bd52e6b View commit details
    Browse the repository at this point in the history
  5. Update CHANGELOG.md

    RobinMalfait authored Oct 3, 2024
    Configuration menu
    Copy the full SHA
    93f5c9f View commit details
    Browse the repository at this point in the history