Loading all nodes of the tree at a time can prolong the response time of the tree when there is too much data.

Source: Internet
Author: User

In the previous articleArticle《Dynamic Tree loading using AjaxThis section describes the dynamic loading tree solution and the defects of Static Loading trees. To illustrate the slow response of the Static Loading tree when the data volume is large, this article provides an example. In this example, all the nodes of the tree are loaded at one time, when the number of nodes in the tree increases, you will obviously feel that the tree is not easy to use. Users often need to wait patiently for the response of the page. ExampleCodeYou can download it from here.

You can adjust the parameters in default. CS to change the depth of the tree test data and the number of subnodes of each level, thus changing the number of nodes of the entire tree:

    1. private const int tree_level = 6; // tree depth
    2. private const int itemcount_per_level = 6; // number of nodes per level

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.