OdinaSpb / jstree

Automatically exported from code.google.com/p/jstree
0 stars 0 forks source link

script timeout #863

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.load data with html ul list
2.run plugins "themes", "html_data", "radiobox"

What is the expected output? What do you see instead?
See a tree with no errors. See a "stop running this script?" error

What version of the product are you using? On what browser?
jsTree 1.0-rc1, $Revision: 191
Error occurs on IE8 but not firefox 3.5

Original issue reported on code.google.com by Andrew.M...@gmail.com on 11 Jan 2011 at 4:26

GoogleCodeExporter commented 9 years ago
1) Try using the latest commit
2) Tell me the size of the UL list (or attach here)
3) Disable radiobox (as it is not one of the official plugins - its third party)

Original comment by ivan.bozhanov on 12 Jan 2011 at 6:23

GoogleCodeExporter commented 9 years ago
Hi Ivan
I experianced the problem with the checkbox plugin as well. The size of the UL 
list was around 600 items with nesting that goes up to 9 levels deep. I was 
able to fix the problem this way:

This line:

if(s_call) { 
    s_call.call(this);  
}

was changed to:

if( ! $.browser.msie ) {

   if(s_call) {

     s_call.call(this);  
 }

}

It will now open quickly & w/o script timeout, however the tree will be closed 
so after the initialization I added a couple of open_node commands

Thanks for your response. If you are interested in the radiobox plugin I will 
check it in.

Original comment by Andrew.M...@gmail.com on 13 Jan 2011 at 4:05

GoogleCodeExporter commented 9 years ago
I tried this but it appears like my problem is not loading the data into the 
DOM. It is when I expand one of my nodes which has 1500 children. I'm about to 
go down the rather painful road of implementing paging because I have to have 
IE support. Is there anything else I can do in IE? The only plug-ins I have are 
xml_data, checkbox, and themes.

Original comment by jason.ma...@gmail.com on 25 Jan 2011 at 3:24

GoogleCodeExporter commented 9 years ago
If you have that much data, I think perhaps you might just want to just write a 
simple nested 
<ul>
  <li>

And then onclick  just set a style to display:block

In other words you might need to consider not using jstree at all. What 
features does jstree provide that you are using?

Another thought, if you open an xml file in ie then they render it inserting js 
that does the same thing, you might just rip that off.

Original comment by Andrew.M...@gmail.com on 25 Jan 2011 at 5:51

GoogleCodeExporter commented 9 years ago
Here profiling results after adding 100 nodes

func    calls   time    self time       total time
data    272599  14.21%  2436.314ms  2981.57ms   0.011ms 0.004ms 178.054ms   jquery-1.4.2.j
s (row 1002)
Sizzle  125744  12.55%  2153.202ms  7734.322ms  0.062ms 0.038ms 216.553ms   jquery-1.4.
2.js (row 2648)
filter  77262   10.94%  1876.387ms  3735.388ms  0.048ms 0.001ms 216.525ms   jquery-1.4.2
.js (row 2823)
cloneCopyEvent  134926  5.52%   946.926ms   4951.944ms  0.037ms 0.029ms 178.092ms 
jquery-1.4.2.js (row 4333)

200k data() calling for 100 nodes adding??? WOW 2700 per node

I think the problem mainly in checkbox plugin

Original comment by theasp...@gmail.com on 26 Jan 2011 at 10:40

GoogleCodeExporter commented 9 years ago
I was using it as a way to select a list of nested items. I think instead I'm 
going to use several comboboxes 
(http://jqueryui.com/demos/autocomplete/#combobox) and change the items in one 
as things are selected in another. Then the user will click "Add" to create a 
list of items which I process.

Original comment by jason.ma...@gmail.com on 26 Jan 2011 at 5:57

GoogleCodeExporter commented 9 years ago
I'm having the same dreaded "stop running script" issue on IE7 and IE8. 
Works beautifully in every other browser.
I am only using Theme and HTML_data ... very simple tree, but, running five 
trees in a sidebar, with each node going at least 3-4 levels deep, some many 
more ... as an example,  one tree is for selecting one of the many California 
educational standards in order to filter an archive of content tagged with the 
standards.
The tree is serving a very important function in the site, so, must find a 
solution for this.
I've tried the fix above, but, it didn't have any effect in fixing the issue 
for me.
Will be clicking the little star in eager anticipation of a fix for this as we 
are set to go live very shortly and all eggs are already in this basket as they 
say ..

Original comment by angelia....@gmail.com on 4 Mar 2011 at 5:20