EasyUI Forum
September 14, 2025, 04:20:22 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: tree : a lot of appends will slow the page  (Read 6810 times)
korenanzo
Guest
« on: August 04, 2016, 09:55:51 AM »

I am using tree;
I have about 600 nodes to load.

I load them one by one tree('append'{} )  because the server send them one after another but mixed with other commands (I cannot manage the server side)

The load itself seems fast because I can see all the nodes immediately, anyway after the load  all the page is no responsive for some seconds.

I f I load less nodes the page is immediately responsive.

So the question is:
Is there a way to load the nodes in a fastest way, an internal cache or proxy...?

Thanks,
RIc
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: August 05, 2016, 01:36:58 AM »

Please look at this example http://code.reloado.com/iyibaf/edit#preview. It loads 600 nodes quickly. Loading in batch mode is more faster. Please call 'loadData' method to load batch data. If you have to call 'append' method, please append multiple nodes at a time instead of single node.
Code:
$('#tt').tree('append', {
parent: selected.target,
data: [{
id: 23,
text: 'node23'
},{
text: 'node24',
state: 'closed',
children: [{
text: 'node241'
},{
text: 'node242'
}]
}]
});
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!