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

Deduplicate each block context generation #1384

Merged
merged 3 commits into from
Apr 29, 2018
Merged

Deduplicate each block context generation #1384

merged 3 commits into from
Apr 29, 2018

Conversation

Rich-Harris
Copy link
Member

@Rich-Harris Rich-Harris commented Apr 29, 2018

Shaves a few bytes off, and should make things slightly more efficient.

One thing I'd also like to experiment with, after this PR, is using Object.create instead of assign for creating child contexts. It might be quicker and more memory-efficient than duplicating parent properties for many child contexts.

Fixes #1287.

@codecov-io
Copy link

codecov-io commented Apr 29, 2018

Codecov Report

Merging #1384 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1384      +/-   ##
==========================================
+ Coverage   91.21%   91.21%   +<.01%     
==========================================
  Files         120      120              
  Lines        4428     4429       +1     
  Branches     1362     1362              
==========================================
+ Hits         4039     4040       +1     
  Misses        154      154              
  Partials      235      235
Impacted Files Coverage Δ
src/compile/nodes/EachBlock.ts 98.03% <100%> (+0.01%) ⬆️

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 2c3f846...f5048fc. Read the comment docs.

@Rich-Harris Rich-Harris merged commit dbd5a76 into master Apr 29, 2018
@Rich-Harris Rich-Harris deleted the gh-1287 branch April 29, 2018 20:33
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.

2 participants