pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/plotly/react-pivottable/pull/146

://github.githubassets.com/assets/actions-0e714a98ea09295a.css" /> Configure babel-preset-env target to modern browsers (no ie) by blikblum · Pull Request #146 · plotly/react-pivottable · GitHub
Skip to content

Configure babel-preset-env target to modern browsers (no ie)#146

Open
blikblum wants to merge 1 commit intoplotly:masterfrom
blikblum:no-ie11
Open

Configure babel-preset-env target to modern browsers (no ie)#146
blikblum wants to merge 1 commit intoplotly:masterfrom
blikblum:no-ie11

Conversation

@blikblum
Copy link
Copy Markdown

Basically removes support to IE11 out of box (those that still need this should compile on their side)

It dramatically improves performance of generated code. Below is an example in a hot code path (as specified by the comment)

before

      // this code is called in a tight loop
      var colKey = [];
      var rowKey = [];
      var _iteratorNormalCompletion3 = true;
      var _didIteratorError3 = false;
      var _iteratorError3 = undefined;

      try {
        for (var _iterator3 = Array.from(this.props.cols)[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
          var x = _step3.value;

          colKey.push(x in record ? record[x] : 'null');
        }
      } catch (err) {
        _didIteratorError3 = true;
        _iteratorError3 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion3 && _iterator3.return) {
            _iterator3.return();
          }
        } finally {
          if (_didIteratorError3) {
            throw _iteratorError3;
          }
        }
      }

      var _iteratorNormalCompletion4 = true;
      var _didIteratorError4 = false;
      var _iteratorError4 = undefined;

      try {
        for (var _iterator4 = Array.from(this.props.rows)[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
          var _x16 = _step4.value;

          rowKey.push(_x16 in record ? record[_x16] : 'null');
        }
      } catch (err) {
        _didIteratorError4 = true;
        _iteratorError4 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion4 && _iterator4.return) {
            _iterator4.return();
          }
        } finally {
          if (_didIteratorError4) {
            throw _iteratorError4;
          }
        }
      }

after

// this code is called in a tight loop
    const colKey = [];
    const rowKey = [];
    for (const x of Array.from(this.props.cols)) {
      colKey.push(x in record ? record[x] : 'null');
    }
    for (const x of Array.from(this.props.rows)) {
      rowKey.push(x in record ? record[x] : 'null');
    }

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.

1 participant

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy