More in this section
Blogs RSS feed

Optimizing Page/Widget edit time and page compile time for projects upgrading to Sitefinity 7.1

by Martin Gebov

Prior to Sitefinity 7.1 one could experience an N+1 problem when opening a page for edit or when requesting it on the front-end for the first time. This was due to unnecessary database calls when Sitefinity is trying to construct the ASP controls on the requested page. As of 7.1 this issue has been resolved. Every user can now benefit from this optimization. The mechanism underneath consists of caching calculated metadata about hierarchical persistent objects(ChildProperties) in their parent (ControlProperty). Below are the scenarios when this metadata information is calculated:

  • Adding or updating a control through the page edit screen.
  • First time publishing a page / template after upgrading to 7.1

With this mechanism the system is slowly optimizing itself as editors make changes to the pages. However if you would like to manually optimize and force recalculation of all the metadata, you can launch a scheduled task to do this for you. This is convenient for large systems - an example scenario is when templates that are used by a large amount of pages are rarely changed and therefore the metadata is not calculated.

Following is a code that does does all the calculation:

var task = new FixControlPropertiesTask();
task.WorkMode = FixControlPropertiesTask.Mode.FlagsOnly;
task.Id = Guid.NewGuid();
var manager = SchedulingManager.GetManager();

You can add the task to your project's Global.asax by subscribing to the Initialized event of the Bootstrapper, in a similar fashion to the  sample from our Sitefinity Documentation.


Leave a comment
  1. Brian Mar 24, 2015
    We tried to implement this solution on our 7.0 SF but it made our site much slower not faster at all. Is there anything else we can do to solve this problem
  2. Martin Mar 27, 2015

    Hi Brian,

    This task cannot be run on Sitefinity 7.0. The optimizations for the performance of page opening and editing can be found in versions 7.1 and higher. I would advise to upgrade to Sitefinity 7.1 and above in order to benefit from those optimizations.

  3. Jamal Sep 03, 2015
    So the aforementioned solution is merely an illustration of what versions 7.1 and up are doing, and that we can also implement it manually on versions 7.1 and higher? What else can be done to improve this scenario for clients that are on 7.0 and below still?
  4. Himanshu Jun 18, 2018
    Hello thanks for sharing such informative article. As for your information, If you are new on microsoft edge browser then you must have an information that as all browser your login password are saved to your browser memory if you want to manage saved passwords in microsoft edge then follow the steps from our tutorial.
  5. Antonia Cummins Jul 16, 2018
    the Spanish instructor was out for the majority of the principal semester for therapeutic reasons so we had a couple of pivoting subs. (It took until the most recent month of the semester for them to discover an understudy who talked any Spanish whatsoever Write My Essay For Me Cheap) and one of them was an exercise center educator who opened the class with that she knew no Spanish at all.

    Leave a comment