Bad performance with long dataset and AJAX

4 posts, 0 answers
  1. Erick
    Erick avatar
    81 posts
    Member since:
    Feb 2010

    Posted 13 Feb 2012 Link to this post

    Hi,

    In our application we use the treeview to show parent/child records. Sometimes the trees will be filled with more than 1000 records and multiple levels. At one page the trees are loaded and hidden by a panel, when a button is pressed (or somewhat), the trees will be visible. The trees will switch between hidden/visible within one second without AJAX, but with AJAX about 20-30 seconds (no joke!!).

    I can't reproduce this when run locally but it happens at our production servers (also tested at other servers). Users with very fast internet connection have this problems too.

    We're using RadCompression, GZip and RadSessionState compression (10x smaller pages).

    We've tried:
    - Turning off all compressions (no effects)
    - Hide panels with display: none instead of visible = false (no effects, bigger pagesize)
    - Turning off AJAX (not bad performance)
    - Tree load when requested (after button press)

    We don't like to use Load On Demand because the most trees have many levels and heavy used.
    All trees are bound with cached data, so not connected to databases.

    It seems the most time are spent in AJAX call.

    I hope you know this issue?
  2. Bozhidar
    Admin
    Bozhidar avatar
    1189 posts

    Posted 15 Feb 2012 Link to this post

    Hello Erick,

    Indeed this seem to be an odd behavior and we haven't encountered it before. However from the looks of it it doesn't seem to be caused by RadTreeView.

    Do you use RadAjaxManager for the partial postback, or an UpdatePanel? Also, does the problem reproduce if you use an ordinary asp:TreeView and asp:UpdatePanel?

    It would also be helpful if you sent us a runnable sample solution demonstrating the issue, and possibly a live Url, so that we can observe the issue and investigate it locally.
     
    Kind regards,
    Bozhidar
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. Erick
    Erick avatar
    81 posts
    Member since:
    Feb 2010

    Posted 17 Feb 2012 Link to this post

    Hi,

    The RadTreeView is located in a page with couple of controls/pages:
    - Masterpage with ajaxmanager
    - Page with ajaxmanagerproxy
    - Three RadTreeViews
    - Two RadMenus
    - RadToolbar
    - RadMenuStrip
    - 8 RadCombos
    - And more textinputs

    On each simple Ajax call it's seems post the entire page/viewstate instead of one control.
    When we turning off the viewstate of two trees and rebind the trees on each postback, the performance is 2 a 3 times better.
    So we removed all postbacks of this trees so much possible and replaced with client scripts.

    Because we're using so many controls, we can't use a simple UpdatePanel.
    We're testing Load On Demand with webservice next week, this could give better performance?

    But this don't matter, on a simple page this will happen too:
    One page with two radtreeviews
    One tree have 5 assigned nodes and other tree have 1000 unassigned nodes with short texts and multi levels
    Both trees have this behavoirs:
    - RadContextMenu
    - Drag and Drop
    - Checkboxes
    - CheckChildNodes
    - MultiSelect
    - Events: OnClientNodeDrop, OnClientNodeDragging, OnClientNodeClick, OnClientNodeCheck, OnClientMenu... etc

    The viewstate is count on about 1 to 2MB en will sent it on each simple ajax postback after drag and drop.
    So you de know the application will work very slow because we have to wait for response from the servers
  4. Bozhidar
    Admin
    Bozhidar avatar
    1189 posts

    Posted 22 Feb 2012 Link to this post

    Hi Erick,

    Thank you for getting back to us.

    The amount of ViewState you get is unusually big. Unfortunately since we cannot reproduce this behavior from the information provided alone, there's not much we can do to troubleshoot it. Could you isolate the problem in a sample solution and send it back to us, so that we can test is locally?
     
    All the best,
    Bozhidar
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top