question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Slow when importing from a big ESM bundle

See original GitHub issue

🐛 Bug Report

Currently an ejected CRA is slow when we use @material-ui/icons, especially when importing from @material-ui/icons/esm instead of importing the icons separately. It takes about 120 seconds with a cold / empty cache and 5-6 seconds with a hot / filled cache.

To Reproduce

git clone git@github.com:DanielRuf/test-app.git
cd test-app
yarn
yarn test

Steps to reproduce the behavior:

  • run the tests

Expected behavior

The tests should run very quickly.

Link to repl or repo (highly encouraged)

envinfo

  System:
    OS: Linux 4.15 Ubuntu 18.04.2 LTS (Bionic Beaver)
    CPU: (8) x64 Intel(R) Core(TM) i7-4710MQ CPU @ 2.50GHz
  Binaries:
    Node: 10.16.0 - ~/.nodenv/versions/10.16.0/bin/node
    Yarn: 1.17.3 - /usr/bin/yarn
    npm: 6.9.0 - ~/.nodenv/versions/10.16.0/bin/npm
  npmPackages:
    jest: 24.9.0 => 25.0.0 

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
DanielRufcommented, Sep 25, 2019

Hi @thymikee,

You should be able to see https://github.com/DanielRuf/test-app

git@github.com:DanielRuf/test-app.git

0reactions
github-actions[bot]commented, May 10, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is Webpack Packaging Too Slow? Try the Bundleless Mode
Webpack can package various resources into bundles. As increasing resources need to be packaged, the efficiency of the packaging process ...
Read more >
How CommonJS is making your bundles larger - web.dev
In this post, we'll look into what CommonJS is and why it's making your JavaScript bundles larger than necessary.
Read more >
Minimizing bundle size - Material UI - MUI
Development bundles can contain the full library which can lead to slower startup times. This is especially noticeable if you use named imports...
Read more >
Slow Running Import Fixes And Workarounds - WP All Import
Are your imports running slower than you expected? This guide will walk you through common causes and how to resolve them.
Read more >
Gotchas - Remix
Gotchas · Server Code in Client Bundles · Importing ESM Packages · typeof window checks · Browser extensions injecting code.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found