This is a migrated thread and some comments may be shown as answers.

Slow performance with the RadPanelBar

4 Answers 137 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Ed asked on 15 Oct 2008, 11:54 PM
I am using a RadPanelBar control to house a hierarchical navigation tree in one of the pages on my site.  The Panel Bar has two or three levels of items, each with an associated ID, parent ID, text attribute, URL and two or three other custom attributes.  I have an OnItemClick event handler to update a section of the page whenever an item is clicked (from a custom attribute named "content").  Thus clicking any item causes a post-back.

My problem is this: although the site runs smoothly on my local server, when I deploy it to a remote server I experience long delays when waiting for the screen to be updated after clicking on an item in the Panel Bar.  Using Firebug to investigate, I have found that a typical page is around 125KB in size, with most of this being taken up by the Panel Bar in terms of HTML tags or ViewState contents.

Is there an optimal way to use the Rad Panel Bar in situations like this when the items are "heavy"?  Can I minimise the amount of ViewState required, or compress it somehow?  Are there any settings that might improve performance?  Or should I be looking at moving a lot of my server-side processing to the client?  Any advice would be helpful, either general or specific.

Thanks,

Ed Graham

4 Answers, 1 is accepted

Sort by
0
Ed
Top achievements
Rank 1
answered on 16 Oct 2008, 01:54 PM
A quick update -- I have noticed that you can turn ViewState off for the Rad Panel Bar.  However, the control does not function properly after a post-back if I do this!  Can anyone give me any advice on how ViewState is used by the Rad Panel Bar and what effect disabling it might have?
0
Ed
Top achievements
Rank 1
answered on 17 Oct 2008, 05:35 PM
Well, given the deafening silence, I ended up solving this the hard way, by shifting most of the functionality on to the client and using the client-side Javascript API.  The size of the ViewState (for the Panel Bar) was the major factor that was affecting performance, so I have turned it off; this meant I lost the use of the server-side OnItemClick event, so I rewrote the necessary code in the client-side events OnClientItemClicking and OnClientItemClicked instead.  I had to make use of a few hidden input fields (on the server) to transfer the necessary information and use the client-side RadAjaxManager object to generate a partial post-back from Javascript (using the ajaxRequest() request function) but now it all seems to be working.

Hopefully that will be useful to someone!  Now why do I get the feeling I'm talking to myself ... ;]
0
Accepted
Peter Zolja
Top achievements
Rank 1
answered on 24 Oct 2008, 11:32 PM
The ViewState is the problem because it has to be uploaded back to the server on each postback. I usually disable the ViewState for all the controls and only enable it for the controls I need. Also, look into enabling IIS compression, this can make a big difference. If possible, however, avoid the need for postbacks.

(Yes, sometimes it may look like you're talking to yourself, but it's usually hepful for somebody in the future :)
0
Ed
Top achievements
Rank 1
answered on 27 Oct 2008, 04:37 PM
Yes, that's what I thought as well -- my upload speed is much slower than my download speed, which I presume is what was making it so much slower to post the page back than it was to load it in the first place.

Thanks for the answer, Peter, and a good suggestion to look at compression inside IIS -- I hadn't thought of that.
Tags
PanelBar
Asked by
Ed
Top achievements
Rank 1
Answers by
Ed
Top achievements
Rank 1
Peter Zolja
Top achievements
Rank 1
Share this question
or