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
{
get
{
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"
?>
<
controlsConfig
>
<
viewMap
>
<
viewSettings
hostType
=
"Telerik.Libraries.WebControls.Admin.LibrariesControlPanel"
>
<
views
>
<
remove
name
=
"CategoriesView"
/>
<
add
name
=
"CategoriesView"
viewType
=
"CategoriesViewCustom, App_Code"
></
add
>
</
views
>
</
viewSettings
>
</
viewMap
>
</
controlsConfig
>
6. Restart the application right after you save Telerik.Sitefinity.Configuration.ControlsConfig.xml
7. Run your website.
Attached Files