More in this section
Blogs RSS feed

Optimize backend CategoriesView performance in Sitefinity 3.7

by User Not Found

Recently we received several bug reports from some of our customers about problems with CategoriesView performance when they have over 200 categories. We ran some test and it turned out that the counting that we perform and the view structure produced very large output. This leads to server timeout or your browser just hangs on for several minutes before you see all categories. We tried to optimize the counting from the view and made some client binding optimizations to the RadTreeView control which actually displays provider categories. If you experience this problem you can download the attached zip and add it to your project following the setup instructions listed below.

How to set up:

1. Download and extract the zip archive.

2. Add CategoriesViewCustom.cs to your App_Code folder

3. Add CategoriesView.ascx and App_LocalResources to your project. By default the attachment contains MyTemplates folder where these templates reside. If you want to change the templates location, do not forget to alter LayoutTemplatePath property of CategoriesViewCustom class

public override string LayoutTemplatePath
            return "PATH TO CategoriesView.ascx";

4. Add/open  ~/App_Data/Configuration/Telerik.Sitefinity.Configuration.ControlsConfig.xml file which is used for mapping external templates.

5. Map the custom template as shown below. Here we replace the built-in view with the custom one.


<?xml version="1.0" encoding="utf-8"?>
    <viewSettings hostType="Telerik.Libraries.WebControls.Admin.LibrariesControlPanel">
        <remove name="CategoriesView" />
        <add name="CategoriesView" viewType="CategoriesViewCustom, App_Code"></add>

6. Restart the application right after you save Telerik.Sitefinity.Configuration.ControlsConfig.xml

7. Run your website.


Attached Files


Leave a comment
  1. Paul Feb 15, 2010
    Wow! Thank you for the great article!
  2. Sam Mar 29, 2010
    Does this fix apply for all modules (news, generic content, images&documents)? Or it just works for Libraries?
  3. Ivan Dimitrov Mar 30, 2010
    It can work for all Generic Content based modules
  4. Chris Mar 30, 2010
    Can you elaborate on how to get it working on News and Events specifically?  This is what I did:

            <!--Provides user interface for managing categories in the News module.-->
            <viewSettings hostType="Telerik.News.WebControls.Admin.NewsCategoriesView">
                    <remove name="NewsCategoriesView" />
                    <add name="NewsCategoriesView" viewType="CategoriesViewCustom, App_Code"></add>

            <!--Displays all categories for the Events module-->
            <viewSettings hostType="Telerik.Events.WebControls.Admin.CategoriesView">
                    <remove name="CategoriesView" />
                    <add name="CategoriesView" viewType="CategoriesViewCustom, App_Code"></add>

    However, the error I got was:

    Unable to cast object of type 'Telerik.News.WebControls.Admin.NewsCategoriesView' to type 'Telerik.Libraries.WebControls.Admin.LibrariesControlPanel'.
  5. what is a teleprompter Dec 07, 2012
    The performance is the utmost importance for this that is why everything is doing alright. That is why people learned a lot from it,,, right? 
  6. what foods are in the paleo diet Apr 24, 2013
    Now of course I would like to at least make it clear then. I am sure things will get better. I love it then. 
  7. exam simulator Apr 24, 2013
    I really enjoyed reading your article here, thanks for the good insight.
  8. pmp certification Apr 24, 2013
    I have been looking for this information for a couple of an hour and I am so glad that I found this article ..
  9. autocom cdp pro update Jun 17, 2013
    Autocom CDP Pro (Compact Diagnostic Partner ) Autocom CDP Pro is a PC based OBD II diagnostic tool with full functionality for reading and erasing diagnostic ...

    Leave a comment