+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Slow load time for admin Pages.aspx - DB design?

Slow load time for admin Pages.aspx - DB design?

7 posts, 0 answered
  1. John
    John avatar
    22 posts
    Registered:
    21 Jun 2010
    21 Jun 2010
    Link to this post
    Hello!  We are developing a Sitefinity site that will end up having ~15,000 pages and ~300 page groups.  We are using Sitefinity 3.7 SP3.  We're in the process of loading pages and are currently at ~6000 pages and 180 page groups, and performance has degraded terribly on a couple pages, most notably the admin Pages.aspx.  We were on a poor hardware profile and had load times of ~40 seconds for admin pages.aspx.  I upgraded our hardware profile, particularly the database specs, and it now loads ~20 seconds, but it gets worse as we add more page groups and is already close to unusable, and our hardware profile is now excellent. 

    I played around with SQL profiler and figured out what's happening.  When the tree is loaded on the left side of pages.aspx, there's hundreds of this proc call:

    exec sf_SecPermissions @P_ItemType=N'Telerik.Cms.ICmsPage',@P_ObjectID='29336D51-20C3-48D5-BB14-7E202905E261',@P_Role=NULL,@P_Application=N'/',@P_RoleProvider=N'Sitefinity'

    where the ObjectID corresponds to all pages in sf_pageBase with a parentID of null.  Each individual call takes only a few hundred milliseconds, but with so many calls it's slowing the page down to unusability.  So it looks like the tree is looping through every page group in the system and calling a permissions check on it.  Is this correct?  If so, this seems like a poor design - shouldn't there be a single call to the database with the user as a parameter, and then a single dataset response with all pages the user has access to, as opposed to looping through every page group and doing a separate proc call?

    Regardless, is there anything we can do to fix this performance issue?  I am running in debug mode, have tweaked IIS to try to improve performance, and tried a # of other things.  But with there being 180 (eventually 300) separate database proc calls for permissions on a single page load, it's not surprising these things didn't help much.

    Thanks in advance!
    ~John
  2. John
    John avatar
    22 posts
    Registered:
    21 Jun 2010
    21 Jun 2010
    Link to this post
    correction: running with debug mode set to false
  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    21 Jun 2010
    Link to this post
    Hi John,

    You could take a look at this post - Slow Page Management  where I have provided a solution which uses RadTreeView bound through WebService. The response is made for less then a second when you use WebService. In Sitefinity 3.7 SP3 we optimize the GridView, because we found a glitch in the performance, so the problem should be only in the RadTreeView control.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  4. John
    John avatar
    22 posts
    Registered:
    21 Jun 2010
    21 Jun 2010
    Link to this post
    Ivan, I appreciate the quick feedback.  That other post contains some useful stuff, hopefully I'll be able to hack in some kind of temporary solution.  I'm in the same boat as mcpdinkansas in that other post - we have a big client we need to go live with soon, and are unable to wait for SF4.

    To start, before I get to binding with the webservice, I just put a Visible="false" on the RadTreeView in admin/controltemplates/pages/sitemappanel.ascx .  But the page still takes too long to load, and there's still the same repeated proc calls going to the database causing the issue.  When looking at the page, the sitemap tree is indeed absent.  Is there something I'm missing, or could it be something else loading up all those proc calls?  Just to confirm it's not the grid, my telerik.cms.dll version is 3.7.2096.220, which is SP3, right?  Here's my my admin/controltemplates/pages/sitemappanel.ascx code for the RadTreeView, if that may help:

     

    <telerik:RadTreeView ID="SiteNavigation" Visible="false" runat="server" EnableEmbeddedSkins="false" Skin="SitefinitySiteMap" EnableDragAndDropBetweenNodes="true" PersistLoadOnDemandNodes="false" EnableViewState="false" ExpandAnimation-Type="None" ExpandAnimation-Duration="0" CollapseAnimation-Type="None" CollapseAnimation-Duration="0" Width="190" />

    Thanks!
    ~John

  5. John
    John avatar
    22 posts
    Registered:
    21 Jun 2010
    22 Jun 2010
    Link to this post
    I've set both the tree and grid visible's to False, and confirmed that they aren't showing up on the page, and I still end up getting all those silly proc calls making the page load slow.  Is it the case that, even if the asp controls are set to invisible, that the datasource and binding still occurs (similar to other .net controls?).  

    I just really need to figure out what exactly on that page is causing all those permissions check proc calls and do _something_ to make them all stop.

    Thanks!
    ~John
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    24 Jun 2010
    Link to this post
    Hello John,

    Even setting the control Visible property to False there are some calls. You could completely remove the SiteMapPanel control from Sitefinity\Admin\Pages.aspx ( and references from the code behind) which will stop the database queries. You could implement a custom control that will replace the default SiteMapPanel and use the RadTreeView control that is bound through web service as shown in the another forum post.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. John
    John avatar
    22 posts
    Registered:
    21 Jun 2010
    09 Jul 2010
    Link to this post
    Some progress is being made, but there's some duplicate threads on this issue, so the conversation is moving to the thread referenced earlier in this discussion:

Register for webinar
7 posts, 0 answered