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.

Performance issue with several charts (regression in v0.73)

See original GitHub issue

Describe/explain the bug When doing re-render (change of the input data) of the legend in the Bar chart, it’s extremely slow (several seconds). Waiting for: 'requestAnimationFrame' handler took <N>ms

This behavior is best spotted when you have bigger chart ~30 items.

When you do first render it’s super fast. Only on data change it’s slow. It happens only with Legend change, when you change the chart data (values) it’s still fast.

We have not tested any other charts than Bar Chart - as we don’t use them with big data.

We have view with 2 big charts - on data input change it takes ~5s for them to re-render. image

To Reproduce Example code https://codesandbox.io/s/perfomrance-issue-16vsp?file=/src/index.tsx The only thing it does is randomize the legend values on button click.

Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/s/perfomrance-issue-16vsp?file=/src/index.tsx
  2. Open dev tools
  3. Click on button “Click me”
  4. Observe the long wait

Expected behavior The Chart is refreshed fast.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Google Chrome is up to date
  • Version 92.0.4515.159 (Official Build) (64-bit)

Regression The chart works fast with version 0.72 the performance issue is introduced in version 0.73

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:4
  • Comments:18 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
plouccommented, Sep 7, 2021

I think I found the issue, now react-spring does not unmount components after a leave transition, we’ll have to configure the expires property to solve this.

1reaction
animalxxvcommented, Sep 29, 2022

Had the same issue on 0.79.1 for svg bar and scatterplots. I ended up switching to the canvas versions as the issue does not persist there (although you miss out on the nice transitions)

Just saw your comment after posting my comment… I can confirm the workaround works for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tools for summarizing and visualizing regression models
The support jtools provides for helping to understand and report the results of regression models falls into a few broad categories:.
Read more >
Performance Evaluation of the Multiple Quantile Regression ...
Abstract. The spatial distribution of soil moisture (SM) was estimated by a multiple quantile regression (MQR) model with Terra Moderate Resolution Imaging ...
Read more >
Regression with Stata Chapter 1 – Simple and Multiple ...
This data file contains a measure of school academic performance as well as other attributes of the elementary schools, such as, class size,...
Read more >
Evaluate the Performance of Deep Learning Models in Keras
Keras provides two convenient ways of evaluating your deep ... problem while using Keras, my problem is regression problem and I would like ......
Read more >
Localizing software performance regressions in web ... - UBC ECE
from web applications, to identify performance regression-causes. ... Generate execution timelines for two versions of the application: one version before ...
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