This is a migrated thread and some comments may be shown as answers.

performance issue when using d3

2 Answers 32 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ian
Top achievements
Rank 1
Ian asked on 21 Jul 2015, 03:18 PM

Hi, I have a simple mobile site with a splitview and a main view. The split view has a list of categories and the main view displays a number of charts using d3.js.

The functionality works fine, but it is very slow when selecting a new category in the split view. Looking at a profile in chrome developer tools shows that 80% of the time is spent removing the children in the svg/g nodes of the d3 charts. Obviously there are a lot of these children as the charts have a lot of points and it seems that each one traverses the history list via a kendo observer pattern.

Is there a way to speed this up? Can I use a bit of java-script before the navigation happens to destroy the d3 svg elements without triggering all of the expensive kendo calls?

 

Thanks,

Ian

2 Answers, 1 is accepted

Sort by
0
Ian
Top achievements
Rank 1
answered on 21 Jul 2015, 04:09 PM
I've attached a screen-shot of the profile result to illustrate what I mean.
0
Petyo
Telerik team
answered on 23 Jul 2015, 06:00 AM
Hi,

you can use some of the view lifecycle events to do that - I am not sure that this will speed the things up, as the code you refer to is basically triggered by the removal of the element.

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
General Discussions
Asked by
Ian
Top achievements
Rank 1
Answers by
Ian
Top achievements
Rank 1
Petyo
Telerik team
Share this question
or