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.

Old performance issue not fixed ( development only )

See original GitHub issue

Current behavior: Performance difference between development and production is very different when using jsx pragma. Issue probably has to do with #1467

In one of my material-ui projects I get the following numbers in development: image and the following in production: image Performance difference is almost 150 times slower. The screenshots are from only 3 material-ui elements that are rendering.

To reproduce:

  1. Use a chromium based browser to get a highly accurate timer on the console
  2. Go to https://codesandbox.io/s/emotion-issue-template-forked-my9lw
  3. Click on rerender and watch console for time it took to run jsx code in development.
  4. Uncomment line 13 to set NODE_ENV environment to production
  5. Click on rerender and watch console for time compared to step 3

Expected behavior: I expected the performance difference to be at the worst case scenario 2x times slower

Environment information:

  • react version: 17.0.1
  • @emotion/react version: 11.1.5

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:15
  • Comments:37 (13 by maintainers)

github_iconTop GitHub Comments

3reactions
Andaristcommented, Mar 24, 2021

For the time being I suggest using patch-package to disable that part of the code.

I’ll be investigating this - I’d like to understand why this is slow for you first. After I get a better understanding the issue will get either fixed or some kind of an opt-out flag will be added (I don’t completely put off the table dropping this code entirely either).

2reactions
Andaristcommented, Mar 22, 2021

I’m slammed with work right now so I won’t be able to look into it soon. It would be appreciated if you could dig into this deeper to assess what’s the problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Help an Underperformer - Harvard Business Review
First, see if you're the problem.
Read more >
Troubleshooting application performance: Issues and answers
Sometimes poor performance is a problem unintentionally baked into application design; most commonly via over-componentization. Development ...
Read more >
5 Performance Management Problems [And Possible Solutions]
A few common performance management problems that managers see are: Poor prioritizing and time management. Lost time (coming into work late, ...
Read more >
Performance issues when you call web services - ASP.NET
This article provides help to solve the performance issues that occur when you make calls to web services from an ASP.NET application.
Read more >
Performance improvement efforts — the dreaded side of ...
Sometimes performance issues need to be fixed ASAP, no matter the expenses ... solution so that not only you will fix the performance...
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