Page 1 of 1

Load large tree under Internet Explorer 6

Posted: 28 Apr 2007, 12:29
by Quang
Hans,

Tree Menu is extremely good and easy to configure, I used it in several in-house applications without any problem.

With one new application I generated a tree with about 2000 nodes, Firefox and Opera having no problem loading and displaying the tree. However, Internet Explorer 6 pushed CPU utilisation up to 99% and stayed there for ever. When I reduced the tree size to about 1000 nodes the problem went away.

Do you know anybody encountered the same problem?

Is that some sort of limitation of IE6?

Can you suggest a solution for that problem?

Once again thanks for sharing a valuable piece of software.

Regards

Quang

Problems with large tree in IE6

Posted: 28 Apr 2007, 13:03
by Hans
Hello Quang,

you're the first person describing such a problem here. I myself tested trees with up to 10000 items using IE5/6/7, Firefox, Opera,... without such troubles.

Could you please check your format (e.g. missing commas, semicolons, quotes,...). For me it looks like a format-error leading to an endless loop in IE. Maybe you can split your tree into 2 parts (the first 1000 items and the second 1000 items) to find the faulty part and then successive refine the splits to locate the faulty line/s (if any).

If the above steps are without success, you may send me your files and i will try to find the bug. To do so, you also should provide me some additional informations (IE version, operating system, RAM,...).

I hope the above informations are useful for you. If the problem persists, please don't hesitate to contact me again.

Thank you for using TreeMenu
Hans Bauer

Load large tree under Internet Explorer 6

Posted: 28 Apr 2007, 17:38
by Quang
Wow, that's quick.

I'll follow your suggestions.

Quang

Load large tree under Internet Explorer 6

Posted: 30 Apr 2007, 19:03
by Quang
Hans,

I tested again and the problem still persists on these platforms:

- Windows XP SP2 Home and Professional, Windows 2003 Server

- IE 6.0.2900.2180 and 6.0.3790.1830

- Memory size ranges from 1GB to 4GB.

Actually, the browser did not hang. It's just very slow, 2-3 minutes loading time and it pushes the CPU usage to 95-100%.

The tree loaded fine with IE7, Firefox and Opera. I'd really appreciate if you have a look at the data which were generated by a script.

Regards

Quang

Thank you for testing

Posted: 30 Apr 2007, 20:43
by Hans
Hello Quang,

thank you for testing my suggestions. Could you please send me your file including the treemenu? I will look for a comparable platform and check the scripting routines for time usage to find the obstruction.

In former times i already recognized that the IE-handling of Javascript is not very advantageous. With your help i hope to find out the reason of this disadvantage. You find my e-mail through the imprint of my website.

Thanks again for your cooperation.

Hans Bauer

Thank you for your file

Posted: 01 May 2007, 09:33
by Hans
Hello Quang,

thank you for sending me a file including your TreeMenu. Could you please explain me why you use items like

Code: Select all

tree.add(0,' <a href="?id=534&tb=Y">xxx® xx® xx-xxx</a>','','','','','');
Especially why do you use a link inside the text-argument of the menu-item? Usually i would write

Code: Select all

tree.add(0,' xxx® xx® xx-xxx','','?id=534&tb=Y','','','');
Also '?id=534&tb=Y' is no valid url but only a query to be added to an url.

Moreover including the link inside the text-argument and giving an empty url-argument you bypass all routines of TreeMenu dealing with references. TreeMenu will handle your item as text-only and link-free because your url-argument is empty. Such items are expected for parent nodes of a subtree but not for final items within a subtree. The only action TreeMenu should initiate is to toggle the open/close-state for a nonexistent subtree. Can you explain me why you code like this?

Additionally i found items like

Code: Select all

tree.add(0,' xxxxxx xxxxxx</a>','','','','','');
With the closing '</a>' link-tag you may corrupt the html-structure of the file TreeMenu is located in. Maybe this could be one reason for IE-6 to get into troubles displaying the tree. At the moment i can't say if this is the reason for the long delay IE-6 produces for you.

Your handling is quite different from the predetermined usage TreeMenu was coded for. Debugging TreeMenu for your aim will require some further explanations describing me your intention.

Could you give me some more informations?

Thank you again
Hans Bauer

Load large tree under Internet Explorer 6

Posted: 01 May 2007, 13:43
by Quang
Hans,

Thanks for your quick response.

About the line:

Code: Select all

tree.add(0,' <a href="?id=534&tb=Y">xxx® xx® xx-xxx</a>','','','','','');
That is one of my attempt to see there is any difference, in the original version, as you pointed out, I wrote

Code: Select all

tree.add(0,' xxx® xx® xx-xxx','','?id=534&tb=Y','','','');
As for the dangle </a> tags, that was my fault. I left them in by mistake when I replace real data with dummy characters.

In the application, when users click on the node with query info, the script will send the query to a server side script to retrieve related info from a database and return the results. This way works well in some applications that I developed before with small size of data

Do you want me to send another set of data?

Regards

Serverside script, special characters?

Posted: 01 May 2007, 14:13
by Hans
Hello Quang,

one question, just for my interest: how do you send a pure query to a serverside script without pointing to this script using its url?

Another hint: You included the special character '®' into your text-argument of TreeMenu. This is not a pure ascii charakter and thus you should mask it with the appropriate html-encoding '&reg;' (see http://www.selfhtml.org). When writing this character as unicode, maybe there is a mismatch with the content-type of your html-document (inspect your html-header, usually e.g.: charset=iso-8859-1 for standard characters). Can you try to build your tree without this special character and/or can you try to adjust the charset of your html-document? Some months/years ago another user of TreeMenu reported me a problem with IE on using/changing to a false charset. It seemed that IE hangs on a lately change, affecting many html-pages, not only html-pages with TreeMenu.

I hope this reply is useful for you. Could you please tell me if the above hints helped to solve your problem? If the problem persists, please let me know and i will have a deeper look into debugging for the fault.

Thanks again for your cooperation
Hans Bauer

Load large tree under Internet Explorer 6

Posted: 02 May 2007, 14:46
by Quang
Hans,

I removed all the special characters but there is no improvement in the loading time :cry:

About the query arguments, the Treemenu is pushed out by a server script, therefore the script is the default URL.

Once again, thanks for your time.

Cheers
Quang

New file version?

Posted: 02 May 2007, 15:14
by Hans
Hello Quang,

could you please send me your file including the TreeMenu with the above mentioned rectifications (removed closing only '</a>'-tags, without special characters) to enable me debugging the cleaned file?

Furthermore now i must ask you to be somehow patient. I will have to setup a new pc with the mentioned operating system and browser version to be able to reproduce your report. Unfavourable at the moment I'm in extremely pressure of time due to my job. But be sure: I'm working to solve your problem as fast as even possible.

Thank you again for your cooperation
Hans Bauer

Load large tree under Internet Explorer 6

Posted: 02 May 2007, 23:12
by Quang
Hans,

Don't worry, your support is the best and most helpful I ever had :D

I think that I just discover the cause of the problem.

At the moment I use ie7-standard-p.js by Dean Edwards (http://dean.edwards.name/IE7/) to overcome some CSS problems in IE6. When I removed that script, the performance improves significantly.

I tried to use the shorter version of the script consists of ie7-core.js and ie7-css2-selectors.js (see http://dean.edwards.name/IE7/usage/configure.html) the performance is much better that the full version ie7-standard-p.js but it is still much worse than when the TreeMenu under Firefox and Opera.

In summary here is some stats in loading a 2000 node tree:

- Firefox/Opera: 2-3 seconds
- IE6 with ie7-standard-p.js: 2-3 minutes
- IE6 with ie7-core.js and ie7-css2-selectors.js: 15-20 seconds

Therefore, the problem is not from TreeMenu. My Javascripts skill is almost nil, therefore I couldn't do any real diagnostic of the problem. I would appreciate if you can have a look to see any thing that I can do to get around the problem.

I also need the IE7 script to get around some CSS problem in IE6 :cry:

Regards

Quang

My compliment

Posted: 03 May 2007, 08:12
by Hans
Hello Quang,

wow, you really did great steps forward to solve the delay problem and thousand thanks for your link to http://dean.edwards.name confirming my strong suspicion that IE's javascript handling is not very advantageous. I'm very happy to hear that TreeMenu is not the reason for slowing down IE.

Now my problem is: Many people still use unfavourable IE-6 and IE-7 seems to handle javascript better but not satisfactory as happened to you. To optimize TreeMenu for the deficient javascript handling of IE for large trees i will have to search for the reason by trial and error. Because all my testing scripts did not fall into the trap, i'd prefer to use your rectified input (see above). Could you please send me your rectified input?

Thank you a lot.
Hans Bauer

New Interner Explorer 8

Posted: 25 Sep 2008, 08:29
by Hans
The problem with some very large trees using IE-6/7 should be solved using IE-8. IE-8 uses a long waited and faster Javascript-engine. Nevertheless the new javascript-engine of IE-8 remains considerably slower (factor 2-4) than the engines of thunderbird-3, opera and safari in many tests (c't computer magazine 19/2008, page 189).

Re: Load large tree under Internet Explorer 6

Posted: 28 Jul 2009, 08:36
by swaze
for my tree with about 1200 nodes the dsl-loading time should be negligible and the tree is shown within less than 2 seconds using ie-8, ff or safari. no prob.