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

Large JSON file issue

6 Answers 106 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Annie
Top achievements
Rank 1
Annie asked on 18 Apr 2014, 09:33 PM
I have a XML with over 1k nodes. A JSON file i created off the nodes and loaded into kendo treeview. The treeview is not loading at all and the page times out. Any suggestion to help?

$.ajax({
            dataType: "json",
            url: "/EnrichmentConfiguration/GetTreeviewXsd",
            data: { enrichmentConfigurationId: ecId.val() },
            type: "GET",
            success: function (data, textStatus, jqXHR) {
                $("#treeview-xsd").kendoTreeView({
                    dataSource: data,
                    select: treeNodeSelected
                });
            },
            error: function (jqXHR, textStatus, errorThrown) {
                $("#error-treeview-xsd").show();
            }
            });

This is my jquery call

6 Answers, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 21 Apr 2014, 10:24 AM
Hello Annie,

Can you please submit a sample page that shows the issue through the Kendo UI Dojo? The issue depends on the format of the JSON, so simply initializing the TreeView with sample data (without making the AJAX request) will be sufficient for us to reproduce it.

Regards,
Alex Gyoshev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Annie
Top achievements
Rank 1
answered on 21 Apr 2014, 02:38 PM
Hey Alex,

http://trykendoui.telerik.com/AvOk

This is a sample created with one of our smaller sample datas. It works fine, as you can see. 

https://www.dropbox.com/s/c8z0sawwc92lyjf/bigTest.json
This is a link to the large json file that is causing the timeout. 
0
Annie
Top achievements
Rank 1
answered on 21 Apr 2014, 03:21 PM
http://jsfiddle.net/UTfV2/

the above link is to a jsfiddle with the large json text used for the datasource. When I hit run, nothing shows up.
0
Alex Gyoshev
Telerik team
answered on 22 Apr 2014, 07:47 AM
Hello Annie,

I am uncertain if such amount of data can be loaded in the browser without crashing it. As a general performance improvement, you can load each level on demand, so that only requested data by the user is rendered.

Regards,
Alex Gyoshev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Factory Mind
Top achievements
Rank 1
answered on 21 Aug 2015, 03:44 PM

Hi,

I'm facing with a similar issue, but in my case the data is on the client (i need to compute the JSON structure clientside). Is there any way to virtualize the dataset on client side (similar to your "Virtualization of local data" in grid demos)?

Tnx, J

0
Kiril Nikolov
Telerik team
answered on 25 Aug 2015, 03:05 PM

Hello JFox,

 

There is no load on demand implementation with local data, at the moment. You can submit this as a feature request on UserVoice, so that it is considered for implementation in a future release.

 

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
TreeView
Asked by
Annie
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Annie
Top achievements
Rank 1
Factory Mind
Top achievements
Rank 1
Kiril Nikolov
Telerik team
Share this question
or