Skip to content

Avoid memory issues with hoisted variables#4183

Merged
lukastaegert merged 1 commit intomasterfrom
gh-4181-fix-memory-issue
Jul 21, 2021
Merged

Avoid memory issues with hoisted variables#4183
lukastaegert merged 1 commit intomasterfrom
gh-4181-fix-memory-issue

Conversation

@lukastaegert
Copy link
Copy Markdown
Member

@lukastaegert lukastaegert commented Jul 21, 2021

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:
Resolves #4181

Description

This will avoid a serious memory issue when using a lot of hoisted variables by changing the way those variables are deoptimized.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jul 21, 2021

Thank you for your contribution! ❤️

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

npm install rollup/rollup#gh-4181-fix-memory-issue

or load it into the REPL:
https://rollupjs.org/repl/?pr=4183

@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 21, 2021

Codecov Report

Merging #4183 (9a81b83) into master (ea96ab0) will increase coverage by 0.00%.
The diff coverage is 91.66%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4183   +/-   ##
=======================================
  Coverage   98.33%   98.34%           
=======================================
  Files         202      202           
  Lines        7227     7230    +3     
  Branches     2114     2114           
=======================================
+ Hits         7107     7110    +3     
  Misses         58       58           
  Partials       62       62           
Impacted Files Coverage Δ
src/ast/variables/LocalVariable.ts 93.24% <87.50%> (+0.18%) ⬆️
src/ast/nodes/Identifier.ts 100.00% <100.00%> (ø)
src/ast/scopes/BlockScope.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ea96ab0...9a81b83. Read the comment docs.

@lukastaegert lukastaegert force-pushed the gh-4181-fix-memory-issue branch from b6745f0 to 9a81b83 Compare July 21, 2021 06:37
@lukastaegert lukastaegert marked this pull request as ready for review July 21, 2021 06:39
@lukastaegert lukastaegert merged commit 8d1cdad into master Jul 21, 2021
@lukastaegert lukastaegert deleted the gh-4181-fix-memory-issue branch July 21, 2021 06:43
@sosukesuzuki
Copy link
Copy Markdown

Thank you!!

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.

Rollup version 2.53.2 uses substantially more memory than 2.53.1

2 participants