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

docs: add additional tips for heap out of memory #4702

Merged
merged 2 commits into from Nov 8, 2022

Conversation

benmccann
Copy link
Contributor

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers: vitejs/vite#2433

Description

A number of people are hitting this issue in the Vite repo. Commenters there have described a number of actions that help though not resolve the issue. It's a long thread and the tips are easy to miss, so consolidating them here should help users

@codecov
Copy link

codecov bot commented Nov 3, 2022

Codecov Report

Merging #4702 (780d68a) into master (20d82f0) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #4702   +/-   ##
=======================================
  Coverage   99.02%   99.02%           
=======================================
  Files         215      215           
  Lines        7593     7593           
  Branches     2105     2105           
=======================================
  Hits         7519     7519           
  Misses         24       24           
  Partials       50       50           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

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

Thanks a lot, looks like a very good list of suggestions.

@@ -114,6 +114,8 @@ node --max-old-space-size=8192 node_modules/rollup/bin/rollup -c

increasing `--max-old-space-size` as needed. Note that this number can safely surpass your available physical memory. In that case, Node will start paging memory to disk as needed.

You may reduce memory pressure by introducing code splitting by using dynamic imports, importing just specific modules rather than whole dependencies, disabling sourcemaps, or increasing the size of your swap space.
Copy link
Member

Choose a reason for hiding this comment

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

Does code-splitting really help? I definitely fully agree with everything else and I would also leave it in here, but it intrigues me as I would not expect it to make a lot of difference for Rollup at the moment.

@lukastaegert lukastaegert merged commit 7307bfa into rollup:master Nov 8, 2022
@rollup-bot
Copy link
Collaborator

This PR has been released as part of rollup@3.3.0-0. Note that this is a pre-release, so to test it, you need to install Rollup via npm install rollup@3.3.0-0 or npm install rollup@beta. It will likely become part of a regular release later.

@rollup-bot
Copy link
Collaborator

This PR has been released as part of rollup@3.3.0. You can test it via npm install rollup.

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.

None yet

3 participants