Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line time series axis rerender loop #1379

Closed
LoicUV opened this issue Jan 7, 2021 · 5 comments · Fixed by #1408
Closed

Line time series axis rerender loop #1379

LoicUV opened this issue Jan 7, 2021 · 5 comments · Fixed by #1408

Comments

@LoicUV
Copy link

LoicUV commented Jan 7, 2021

Render a line chart with time series on X axis. Rerender the parent component (eg useState). The X axis component enters a render loop.
I tried it with both native & string dates. Doesn't occur with a point scale.

Codesandbox

Looks like each defaultTickRenderer components of Axis is getting a new key every second.
Capture d’écran 2021-01-07 à 12 37 36

@jamesdh
Copy link
Contributor

jamesdh commented Jan 16, 2021

I think I'm also experiencing this with Bar charts at the moment, but still digging into it.

jamesdh added a commit to jamesdh/nivo that referenced this issue Jan 16, 2021
@jamesdh
Copy link
Contributor

jamesdh commented Jan 16, 2021

I pushed a branch into my fork that contains a story which I believe demonstrates this issue.

Feel free to take a look: https://github.com/jamesdh/nivo/tree/bar_time_scale

@jamesdh
Copy link
Contributor

jamesdh commented Jan 17, 2021

Ok, please ignore my above comments. My issue is because Bar charts don't even support time scales as their "index" values.

@stephent
Copy link

I'm seeing something very similar with ResponsiveLine. It appears possibly to be a regression since version 64. If I rollback to 63.1, I don't see it.

With version 67, the line chart seems to end up in a render loop. This fires continuously sometimes from page load, sometimes after a user-initiated change that forces a chart re-render (after which it never stops):

Screenshot 2021-01-29 at 18 43 23

These are the warnings in Chrome that caught my attention:

Screenshot 2021-01-29 at 18 43 31

When I revert to 63.1, and profile using React Tools, the Axes only re-render when I expect (the yellow spikes here):

Screenshot 2021-01-29 at 18 54 47

Let me know if there's more data I can provide or profiling that would be helpful.

@clarkd
Copy link

clarkd commented Apr 9, 2021

We are seeing the same thing, very slow performance and the axis re-rendering constantly.

@wyze wyze linked a pull request Apr 21, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants