TreeView responding very slow...

H

hkhatri

Hi all,
I have around 1500 records under a node of a TreeView
control. When the node in clicked, it takes a lot of time
to expand and display child nodes.. This is becoming a
performance issue for my application.

1. I do not have any images on my TreeView..
2. Populating treeview from client side "onexpand" event
takes more or less same time.

Is there a way I a can expedite this..???

Thanks in advance.
Hitesh
 
A

Alvin Bruney

Basically, no. The treeview isn't designed to hold that much data. Every
post will cause problems until the application crashes. You need to limit
the number of nodes beind displayed to around 30 - 40 otherwise use another
control
 
A

Adam Carden

That is no in fact the problem, I also had the same problem and went
looking for answers and found it.

The crux is this, the .htc control which comprises the treeview uses
javascript to load the images. IE would normally load 20 of the same
image once, however the tree view loads it (gets it from the server) for
each time it is declared including the node lines. So if you have 40
nodes with will try to download 120 images from the webserver.


If your IE (Tool/Internet Options) check for newer versions of stored
pages is set to every visit to the page IE will do what the treeview
wants and load those images roughly 140 times which causes IE to crash.

If you change your chache setting to automatically this does not happen
your treeview should work with at least 200 nodes (the amount I am
currently running)

The problem is you do not know what your users cache settings and nor
can you change them.

The only answer would be to modify the treeviews .htc behavior to
preload the image and make all images reference it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,079
Messages
2,570,574
Members
47,206
Latest member
Zenden

Latest Threads

Top