[Suggestion] Preloading images and Loading time

Explorer like navigation tree for websites
Navigationsbaum für Internet Auftritte.
Post Reply
Daniel

[Suggestion] Preloading images and Loading time

Post by Daniel »

Hello Hans and Treemenu users, first of all i find treemenu as an excellent option for any kind of application, but sometimes on IE 5.0 or 6.0 i find the loading time of the tree are really long on large trees, especially, after you clean the cache or when you disable the cache of you browser, so far the only way that i found to solve this is usign "preloading" i try to solve this problem adding a small preloading script (on javascript)before the call of the treemenu:

<script >
pic1= new Image(16,14);
pic1.src="../images/open.gif";
pic2= new Image(16,14);
pic2.src="../images/close.gif";
pic3= new Image(16,20);
pic3.src="../images/tieminus.gif";
pic4= new Image(16,20);
pic4.src="../images/tieplus.gif";
pic5= new Image(16,20);
pic5.src="../images/passline.gif";
pic6= new Image(16,20);
pic6.src="../images/tieline.gif";
pic7= new Image(16,20);
pic7.src="../images/endline.gif";
pic8= new Image(16,14);
pic8.src="../images/item.gif";
pic9= new Image(16,20);
pic9.src="../images/endplus.gif";
pic10= new Image(16,20);
pic10.src="../images/endminus.gif";
</script>

i find that the loading time for the treemenu (even when IE cache is empty) is decreased pretty much.

i hope that if you ever plan to release another version or patch or something you could check for this option.
User avatar
Hans
Site Admin
Posts: 77
Joined: 16 Dec 2005, 16:52
Location: Germany
Contact:

Why trying to preload?

Post by Hans »

Hello Daniel,

first of all thank you for using TreeMenu and giving some praise. You wrote
but sometimes on IE 5.0 or 6.0 i find the loading time of the tree are really long on large trees, especially, after you clean the cache or when you disable the cache of you browser
Could you please give me some informations about the number of items you want to integrate into the tree? Usually TreeMenu should work with the same speed using cleared or uncleared cache because the Tree-buildup is processed on the client side only (TreeMenu is Javascript and thus pure client-sided) without cache interaction. But the delay might be caused by the download speed from your website.
To detect the delay due to download speed of your website (or your internet access) you might try to open the tree locally from a folder you stored TreeMenu on your pc at home. The usual time to build up a tree were described in another thread in this forum http://www.h-bauer.de/bb/viewtopic.php?t=16:
- 50 menu-items -> 0.04 sec. (small tree)
- 100 menu-items -> 0.08 sec.
- 200 menu-items -> 0.25 sec.
- 500 menu-items -> 0.61 sec.
- 1000 menu-items -> 1.31 sec. (really large tree)
Could you please compare the above times by opening the tree locally and provide me these informations?
I also believe that preloading images before starting the tree can not satisfy, because TreeMenu is able to load/preload these image by its own. So adding more lines to be downloaded into your file by preloading images only shall increase the download delay but not shorten the buildup-time.

You also might send me your files and i'll do the above checks for you.

Hope this helps to solve your problem
Hans Bauer.
Your forum admin
Post Reply