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

toJSON performance issue with big data

1 Answer 63 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Bridge24
Top achievements
Rank 1
Iron
Bridge24 asked on 11 Jun 2018, 08:25 PM

Hi, we are using kendo with very large in-memory data objects.

Sometimes, we need to extract the "raw" json data, so we use .toJSON on observableArrays.

We got cpu running high in certain circumstances.

We tried to change the original toJSON function, and we were able to move from 15 to 5 seconds for the same dataset.

The hint is to use Object.keys(this) + for(...) loop, instead of [for fields in this].

As you can see in that dojo sample

http://dojo.telerik.com/@foxontherock/UniXASid/35

We'll use that fix in our code, but I think that you may consider adding it in kendo UI source code.

 

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 13 Jun 2018, 07:18 AM
Hello, Daniel,

Thank you for the provided code and the suggestion.

I will forward this to the developers' team for additional evaluation and tests if this approach could be used without causing side effects is some of the scenarios.

Additionally, I added Telerik points for sharing this with us it is highly appreciated.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Data Source
Asked by
Bridge24
Top achievements
Rank 1
Iron
Answers by
Stefan
Telerik team
Share this question
or