kartik-v / yii2-tree-manager

An advanced tree management module using nested sets for Yii 2.
http://demos.krajee.com/tree-manager
Other
150 stars 107 forks source link

Load 1000 nodes makes the widget unusable #248

Closed ghimes closed 5 years ago

ghimes commented 5 years ago

Steps to reproduce the issue

  1. Having a nested sets table consisting of 1000 line. The depth of the structure is 3.
  2. Trying to load a TreeViewInput based on this structure
<?php echo TreeViewInput::widget([
                    'query'          => NetworkTree::find()->addOrderBy('root, lft');,
                    'headingOptions' => ['label' => 'Please select equipments'],
                    'name'           => 'selectedNodes', // input name
                    'value'          => $selectedNodes,
                    'asDropdown'     => false,
                    'multiple'       => true,
                    'fontAwesome'    => true,
                    'rootOptions'    => [
                        'label' => '<i class="fa fa-archive"></i>',
                        'class' => 'text-success'
                    ],
                ]);
                ?>
  1. The loading takes around 5 minutes. The problem seems to be on the client side. The genertaion of the html output is fast, but it seems parsing it through jquery takes a lot of time.

Is there any way to lazy load this?

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.