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 memory usage for parameter deoptimizations #4938

Merged
merged 8 commits into from Apr 16, 2023

Conversation

lukastaegert
Copy link
Member

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:

Description

This PR tries to reduce memory usage by

  • fully removing some caches when they are no longer needed
  • limiting the maximum size of some caches
  • tracking deoptimizations more thoroughly in some places

I hope this helps.

@vercel
Copy link

vercel bot commented Apr 14, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rollup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 14, 2023 5:15am

@github-actions
Copy link

github-actions bot commented Apr 14, 2023

Thank you for your contribution! ❤️

You can try out this pull request locally by installing Rollup via

npm install rollup/rollup#improve-deoptimization-memory

or load it into the REPL:
https://deploy-preview-4938--rollupjs.netlify.app/repl/?pr=4938

@rollup-bot
Copy link
Collaborator

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

@codecov
Copy link

codecov bot commented Apr 14, 2023

Codecov Report

Merging #4938 (9466534) into master (c4cb264) will decrease coverage by 0.04%.
The diff coverage is 95.55%.

@@            Coverage Diff             @@
##           master    #4938      +/-   ##
==========================================
- Coverage   99.01%   98.98%   -0.04%     
==========================================
  Files         221      221              
  Lines        8052     8067      +15     
  Branches     2216     2214       -2     
==========================================
+ Hits         7973     7985      +12     
- Misses         26       28       +2     
- Partials       53       54       +1     
Impacted Files Coverage Δ
src/ast/NodeInteractions.ts 100.00% <ø> (ø)
src/ast/nodes/CallExpression.ts 100.00% <ø> (ø)
src/ast/nodes/NewExpression.ts 100.00% <ø> (ø)
src/ast/nodes/shared/MethodBase.ts 100.00% <ø> (ø)
src/ast/utils/PathTracker.ts 100.00% <ø> (ø)
src/utils/blank.ts 80.00% <50.00%> (-20.00%) ⬇️
src/ast/nodes/shared/MethodTypes.ts 96.29% <66.66%> (ø)
src/ast/variables/ParameterVariable.ts 96.07% <93.54%> (-3.93%) ⬇️
src/ast/nodes/ConditionalExpression.ts 100.00% <100.00%> (ø)
src/ast/nodes/LogicalExpression.ts 100.00% <100.00%> (ø)
... and 12 more

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

@stafyniaksacha
Copy link

I am looking for a reproduction for “Maximum call stack size exceeded”, not “JavaScript heap out of memory”. Those are very different problems.

I have a repository that I can share having this issue, it's fixed using 3.20.3-0 🥇 !

@lukastaegert lukastaegert merged commit bd675b1 into master Apr 16, 2023
14 of 16 checks passed
@lukastaegert lukastaegert deleted the improve-deoptimization-memory branch April 16, 2023 13:01
@rollup-bot
Copy link
Collaborator

This PR has been released as part of rollup@3.20.3. 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.

Memory grow with rollup 3.19
3 participants