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

Drop some corejs #1714

Closed
wants to merge 1 commit into from
Closed

Drop some corejs #1714

wants to merge 1 commit into from

Conversation

mstoykov
Copy link
Collaborator

@mstoykov mstoykov commented Nov 9, 2020

The shim.min.js was generating by running

grunt "build:es7,es6.promise" "--blacklist=es7.math,es7.array.includes" "--library=off" "--path=custom" "uglify"

inside corejs checkedout to tag v2.5.1

@mstoykov mstoykov added this to the v0.30.0 milestone Nov 9, 2020
@mstoykov mstoykov requested review from imiric and na-- November 9, 2020 10:14
@mstoykov
Copy link
Collaborator Author

mstoykov commented Nov 9, 2020

This reduces the mem used for the main.js script from #1167 (comment) by 50% and the load start time from 33 seconds to 10 seconds for 5k VUs

@mstoykov
Copy link
Collaborator Author

mstoykov commented Nov 9, 2020

Things that I would've liked more:

  1. It would've been better to get all the script files that were webpacked and import them. That would've meant that in the future if we want to drop something we can just stop importing it and delete it ... instead of having to rebuild the whole js file.
  2. This one includes a bit more than what seemed necessary(mostly some set/map methods that are no longer in the standard) ... so it is a little bit on the safer side. But dropping those seemed to give less than anound 3-4% impromvement so 🤷

The shim.min.js was generating by running
```
grunt "build:es7,es6.promise" "--blacklist=es7.math,es7.array.includes" "--library=off" "--path=custom" "uglify"
```

inside corejs checkedout to tag v2.5.1
imiric
imiric previously approved these changes Nov 9, 2020
Copy link
Contributor

@imiric imiric left a comment

Choose a reason for hiding this comment

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

Great improvement! 🎉

Can we make that grunt command part of the Makefile? For reference, if nothing else.

@mstoykov
Copy link
Collaborator Author

mstoykov commented Nov 9, 2020

I would still prefer if we can try at

  1. It would've been better to get all the script files that were webpacked and import them. That would've meant that in the future if we want to drop something we can just stop importing it and delete it ... instead of having to rebuild the whole js file.

As that IMO is much better ... unfortunately it turned out to be more involved than what I hoped for so I decided to leave it for later :D

@mstoykov
Copy link
Collaborator Author

mstoykov commented Nov 9, 2020

test262 results mstoykov/k6-test262#1

@mstoykov
Copy link
Collaborator Author

mstoykov commented Dec 2, 2020

superseeded by #1732

@mstoykov mstoykov closed this Dec 2, 2020
@mstoykov mstoykov deleted the stripCorejs branch January 8, 2021 12:42
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

2 participants