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

v2.5.0 performance issue? #3921

Closed
activeperception opened this issue Feb 17, 2017 · 12 comments
Closed

v2.5.0 performance issue? #3921

activeperception opened this issue Feb 17, 2017 · 12 comments

Comments

@activeperception
Copy link

activeperception commented Feb 17, 2017

Hi,

My simple app (angular2) is noticeable slower (loading?/rendering? not sure) after updating to 2.5.0. Anyone experiencing the same issue?

I'll try to put together a jsfiddle.

@etimberg
Copy link
Member

@activeperception please put together a fiddle. I don't think we've done anything to make it slower. Which version did you upgrade from?

@frdteknikelektro
Copy link

Yes this is true, it even crashing browser. But it's okay after downgrading to 2.4.0

@etimberg
Copy link
Member

@frdteknikelektro do you have a test case we can debug?

@frdteknikelektro
Copy link

Here, , , I think the problem is when you try to render Chart in parent that display style is none.

https://jsfiddle.net/frdteknikelektro/9pgs9qo9/ <-- Using 2.4
Try to change it to 2.5

@etimberg
Copy link
Member

Looks like what's happening is that the chart renders even though it has no size. That shouldn't happen

@frdteknikelektro
Copy link

So what do you think? It's okay from until 2.5

@etimberg
Copy link
Member

Yes, I'm not sure what changed in 2.5 to change this. I'm looking through the history to see

@etimberg
Copy link
Member

etimberg commented Apr 1, 2017

@simonbrunel thoughts on this?

@simonbrunel
Copy link
Member

Seems to be caused by the time scale (loop over scaleSizeInUnits == 2674800000 at construction time - update). The chart has no size, but still need to be updated so I guess this issue needs to be fixed at the time scale level.

Maybe @tredston can have a look since the time scale implementation changes a lot in #3914 and might have fixed this issue as well.

@tredston
Copy link
Contributor

tredston commented Apr 2, 2017

Looks like me.width has changed in this example case from 0 to be negative, which results in the tickUnit staying on milliseconds instead of bumping up to larger intervals.

Unfortunately it looks like the negative width causes #3914 to get stuck in an infinite loop.

Edit: Seems like this change causes the y-axis to have a positive width, while before it was set to me.maxWidth = 0. This scale's width ends up making the chart's width negative when calculating the layout.

@andr31
Copy link

andr31 commented Apr 3, 2017

Seems indeed that this problem persists only when using the time scale . I had to search everywhere and remove all display:none props from the chart container in order to solve the freezing problem.

@etimberg
Copy link
Member

etimberg commented May 2, 2017

Resolved in #4105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants