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

Avoid memory issues with hoisted variables #4183

Merged
merged 1 commit into from Jul 21, 2021
Merged

Conversation

@lukastaegert
Copy link
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

@github-actions 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

@codecov 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 Jul 21, 2021
@lukastaegert lukastaegert marked this pull request as ready for review Jul 21, 2021
@lukastaegert lukastaegert merged commit 8d1cdad into master Jul 21, 2021
8 of 9 checks passed
@lukastaegert lukastaegert deleted the gh-4181-fix-memory-issue branch Jul 21, 2021
@sosukesuzuki
Copy link

@sosukesuzuki sosukesuzuki commented Jul 21, 2021

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
Linked issues

Successfully merging this pull request may close these issues.

2 participants