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

Switch from es6-shim to core-js/client/shim #851

Closed
wardbell opened this issue May 19, 2016 · 2 comments
Closed

Switch from es6-shim to core-js/client/shim #851

wardbell opened this issue May 19, 2016 · 2 comments
Labels
effort1: easy (hours) P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful

Comments

@wardbell
Copy link
Contributor

wardbell commented May 19, 2016

tl;dr

The es6-shim is fatally slow for IE10 and IE11. The alternative core-js/client/shim.min.js can be as much as 25x faster.

Switch to that library when generating the ES6 shim script for index.html:

// package.json: "core-js": "^2.4.0",

<script src="node_modules/client/shim.min.js"></script>

Background

We (IdeaBlade) have a large A2 app that can display 1000s of table rows. Works fine in Chrome, Edge, FF. Died miserably in IE11 and IE10.

Discovered that core-js is ​25x faster than the es6-shim library when processing arrays of data. The app is now usable on IE11 (IE10 testing pending).

See https://www.npmjs.com/package/core-js
See also: http://stackoverflow.com/questions/36570532/angular-2-performance-ie11-ngfor

After discussion with @mhevery and PatrickJS, have decided to switch to core-js. Core-js is highly modular and one could build a custom bundle.

We want one file that covers the largest shimming needs and don't want to have to maintain our own fine-tuned bundle. We selected the core-js/client/shim.min.js (77k) as best fit for our needs.

Am in process of migrating all doc samples to use this core-js shim.

Verification:

IdeaBlade reports success on IE11, Chrome, Edge, and FF with this library.

Ward spot checked a few of the larger doc samples in IE11 as well as Chrome and Edge.

No known tests on IE10 or Safari yet.

hansl added a commit to hansl/angular-cli that referenced this issue May 19, 2016
filipesilva pushed a commit that referenced this issue Jun 1, 2016
@filipesilva filipesilva added effort1: easy (hours) command: generate P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful labels Jun 4, 2016
@filipesilva
Copy link
Contributor

Implemented in #1455.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
effort1: easy (hours) P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants