Skip to content

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

Description

@wardbell

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Impacts a large percentage of users; if a workaround exists it is partial or overly painfuleffort1: easy (hours)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions