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(build): disable rollup cache for builds #11454

Merged
merged 2 commits into from Jan 4, 2023
Merged

perf(build): disable rollup cache for builds #11454

merged 2 commits into from Jan 4, 2023

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Dec 21, 2022

Description

Disable rollup cache by default for building (non-watch) as we control the Rollup bundle and do not use the .cache output, which results in unused work. Setting cache: false prevents Rollup from populating .cache

When/if rollup/rollup#4762 lands, it also enables memory perf improvements by default instead of needing the user to opt-in via build.rollupOptions.cache: false. This should help #2433

Additional context

Ran build and also updated the license.


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the PR Title Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@bluwy bluwy added the p3-significant High priority enhancement (priority) label Dec 21, 2022
Copy link
Member

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome 🥇

Copy link
Member

@patak-dev patak-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work here @bluwy 💯
Let's merge this one in 4.1

@patak-dev patak-dev added this to the 4.1 milestone Jan 3, 2023
@patak-dev patak-dev merged commit 580ba7a into main Jan 4, 2023
@patak-dev patak-dev deleted the disable-cache branch January 4, 2023 16:09
danielrentz added a commit to danielrentz/rollup that referenced this pull request Feb 15, 2023
Vite has changed the default of this option to "false" (vitejs/vite#11454), therefore it is needed to be able to set it to "true" explicitly. This may be useful in other situations too, e.g. extending some defaults options object which contains this option set to "false".
lukastaegert added a commit to rollup/rollup that referenced this pull request Feb 16, 2023
* Allow to pass "true" to InputOptions.cache

Vite has changed the default of this option to "false" (vitejs/vite#11454), therefore it is needed to be able to set it to "true" explicitly. This may be useful in other situations too, e.g. extending some defaults options object which contains this option set to "false".

* adapt documentation of "cache" option

* fix type error

* Fix linting

---------

Co-authored-by: Lukas Taegert-Atkinson <lukastaegert@users.noreply.github.com>
Co-authored-by: Lukas Taegert-Atkinson <lukas.taegert-atkinson@tngtech.com>
futurGH pushed a commit to futurGH/vite that referenced this pull request Feb 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3-significant High priority enhancement (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants