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

Forums / Developing with Sitefinity / Page load optimizing and "dynamic" data

Page load optimizing and "dynamic" data

11 posts, 0 answered
  1. Mike
    Mike avatar
    221 posts
    Registered:
    19 Aug 2008
    10 Mar 2009
    Link to this post
    Evening,

    Well we a week away from launching our project here... I currently have the site on our test server and and working with optimizing...

    I am doing this because it takes almost 15sec for and of our pages to load into the browser. After setting caching on some of the pages this drastically improved to about 1 or 2 seconds... This is where we want to be with the page loads...

    But my questions is regarding dynamic data that we might have on a page. For example i have built a control that displays a list of resorts (we a travel site) with pricing and the ability for the user to book a vacation at the resort...

    Now the pricing data (control) is ever changing and needs to be live data, so i can not cache this without running the risk of allowing a user to book based on old data... So how do i optimize this page to load in the 2sec (plus however long the request to our web services are for the pricing data)...

    I have read and am doing all the optimizing tricks mentioned, but non of these docs mention how to handle dynamic data... Is there perhaps some way to force a particular element of the page (control) to process and cache the rest of the page? I wouldn't think so - but how does everyone else handle a scenario like this?

    Thanks,

    Duncan
  2. Mike
    Mike avatar
    221 posts
    Registered:
    19 Aug 2008
    10 Mar 2009
    Link to this post
    This is the type of ASP.NET functionality i am referring to... I need to know how to implement this with my Sitefinity controls... Specifically updating a user control that is on a cached page... or caching the entire page except for a specific control!

    Dynamically Updating Portions of a Cached Page
    Caching Portions of an ASP.NET Page

    Please help,

    Thanks,

    Duncan
  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    10 Mar 2009
    Link to this post
    Hello Duncan,

    We support substitution controls. Here is an example:

    public partial class CustomControls_CacheControl : CacheSubstitutionUserControl  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
        }  
      
        protected override void OnPreRender(EventArgs e)  
        {  
      
            base.OnPreRender(e);  
      
            // here if the user is auth the image will be shown otherwise false  
            if (!Page.User.Identity.IsAuthenticated)  
            {  
                img.Visible = false;  
            }  
        }  
      
      
        [WebEditor("Telerik.FileManager.UrlWebEditor, Telerik.FileManager")]  
        public virtual string Image  
        {  
            get  
            {  
                return img.ImageUrl;  
            }  
            set  
            {  
                this.img.ImageUrl = value;  
            }  
        }  
        private string image;  
      
        public override SubstitutionPageMode PageMode  
        {  
            get  
            {    
                // Parital or Full  
                return SubstitutionPageMode.Parital;  
            }  
        }  
    }  
      

    You can gather other information from my posts here. I hope that this information is helpful.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  4. Mike
    Mike avatar
    221 posts
    Registered:
    19 Aug 2008
    10 Mar 2009
    Link to this post
    Excellent... You are a life saver!

    Thanks,

    Duncan
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    10 Mar 2009
    Link to this post
    Hello Duncan,

    I am always glad to help to Sitefinity community members.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Mike
    Mike avatar
    221 posts
    Registered:
    19 Aug 2008
    10 Mar 2009
    Link to this post
    Oops...

    I manged to get an error... Is there perhaps something special i need to do if there are RadControls on the page that require the script manager?

    The control with ID 'ttmRoomDayInfo' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.

    Duncan
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    11 Mar 2009
    Link to this post
    Hi Duncan,

    Take a look at the following link Adding RadControls for ASP.NET AJAX to an existing application, step 3. Let us know if you need further assistance.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  8. Mike
    Mike avatar
    221 posts
    Registered:
    19 Aug 2008
    11 Mar 2009
    Link to this post
    Hi Ivan,

    yes i have a ScriptManager on my masterpage. The issue pertaining to this scenario is that the page is CACHED... Except for the control containing the RadControls. I believe they need a fresh ScriptManager to run... And since it is a cached page they are not able to...

    How do i get by this? Is there a way (in my control) to check if the script manageer is present and add it before the rest of the contol is rendered?

    Duncan
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    17 Mar 2009
    Link to this post
    Hello Duncan,

    Try setting SubstitutionPageMode.Full. If this does not help, please send us the controls you use or any steps that we could follow.

    All the best,
    Ivan Dimitrov
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  10. Mike
    Mike avatar
    221 posts
    Registered:
    19 Aug 2008
    20 Mar 2009
    Link to this post
    Does this implementation of Substitution control allow access to user session values? Normal Output Cache Substitution does not... I was wondering is Sitefinity might have a solution for this?

    Duncan
  11. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    23 Mar 2009
    Link to this post
    Hello Duncan,

    Currently we also do not support sessions.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Register for webinar
11 posts, 0 answered