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

Adding multiple series with addSeries is very slow #5884

Closed
yogevyuval opened this Issue Oct 26, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@yogevyuval

yogevyuval commented Oct 26, 2016

Expected behaviour

Adding series with addSeries(options, false) is supposed to be fast.

Actual behaviour

I upgraded from an old highcharts version to 5.0.0 and discovered that when I try to add 15 graphs highcharts takes a very long time to load them. I use the add series method and I set the redraw parameter to false. It takes about 1 min to load the graph.

Profiling in chrome shows the problem is that the redraw method actually does get called in setBaseSeries where we iterate the series and remove them, but telling highcharts to redraw.

I tried changing the code to:

This.series.each(....
s.remove(false)
)

And it worked. I think the redraw parameter should be passes to the remove function as well.

Affected browser(s)

Tested with chrome 52

@TorsteinHonsi

This comment has been minimized.

Show comment
Hide comment
@TorsteinHonsi

TorsteinHonsi Oct 26, 2016

Collaborator

@oysteinmoseng Check out if we can do this without redrawing. And why are all the series removed in the first place? There's only one series in the scroller by default. Can we do this cheaper?

Collaborator

TorsteinHonsi commented Oct 26, 2016

@oysteinmoseng Check out if we can do this without redrawing. And why are all the series removed in the first place? There's only one series in the scroller by default. Can we do this cheaper?

@oysteinmoseng

This comment has been minimized.

Show comment
Hide comment
@oysteinmoseng

oysteinmoseng Oct 26, 2016

Collaborator

We have to remove the series as setBaseSeries is called for updates as well, and which series are in the navigator needs to be recomputed.

But I think series.destroy has the intended effect, rather than series.remove so replaced with that. We don't want to fire events and such for this.

Collaborator

oysteinmoseng commented Oct 26, 2016

We have to remove the series as setBaseSeries is called for updates as well, and which series are in the navigator needs to be recomputed.

But I think series.destroy has the intended effect, rather than series.remove so replaced with that. We don't want to fire events and such for this.

@yogevyuval

This comment has been minimized.

Show comment
Hide comment
@yogevyuval

yogevyuval Oct 26, 2016

Thanks for the quick reply.
When is the branch hc5_fixes is scheduled to be merged and released?

yogevyuval commented Oct 26, 2016

Thanks for the quick reply.
When is the branch hc5_fixes is scheduled to be merged and released?

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