Telerik is a leading vendor of ASP.NET AJAX, ASP.NET MVC, Silverlight, WinForms and WPF controls and components, as well as .NET Reporting, .NET ORM , .NET CMS, Code Analysis, Mocking, Team Productivity and Automated Testing Tools. Building on its expertise in interface development and Microsoft technologies, Telerik helps customers build applications with unparalleled richness, responsiveness and interactivity. Telerik products help thousands of companies to be more productive and deliver reliable applications under budget and on time.
Version Q2 2011 released 07/12/2011
select

Editor / Working With Large Content

The size of the content loaded in RadEditor below is 1.25 MB (1,313,683 bytes).

   
  
 
 
   

  • Working with large content - creating, editing, pasting, loading and saving optimizations

    There are a couple of main factors responsible for the slow RadEditor's performance when pasting, loading, editing or saving large XHTML / HTML / TXT files, which content size exceeds 100KB:

    • The Undo / Redo mechanism and other maintenance code that ensures the smooth user experience - it gets increasingly cumbersome and time consuming for the browser to execute it if huge content is in the editor. That is why it is recommended to remove the Undo and Redo buttons from the toolbar when editing large content as shown in this article: Removing Toolbar Buttons.
    • The built-in RadEditor's modules are updatable on selection and they could also decrease the content editing abilities when editing huge content. You can see how to remove the modules in this help article: Disable or Hide Modules.
    • In difference with the TextBox control, which does not process the content when submitting it to the server, RadEditor runs more than 12 content filters, which validate the content and make it XHTML compliant. These filters executes regular expressions and DOM methods to validate the content, which slow down the content submission to the server.
      To disable the built-in filters set the ContentFilters property to None.
    • The content formatting stripping when pasting huge content uses a lot of CPU resources and the browser could freezes for a long period of time depending on the hardware configuration of the client's machine.
      The developer could configure the editor to not check and strip the formatting of the pasted content by setting the StripFormattingOptions property to "NoneSupressCleanMessage".
    • It is important to test the performance only when debugging is disabled. Set <compilation debug="false" /> in the web.config. When it is true, the MS AJAX debugging code causes a severe performance hit on the client-side. The fact that most of the editor functionality is implemented in JavaScript, thus resulting in 10 times slower performance compared to native compiled code.

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Page Theme="Default" Language="vb" Debug="true" AutoEventWireup="true" CodeFile="DefaultVB.aspx.vb" Inherits="Telerik.Web.Examples.Editor.WorkingWithLargeContent.DefaultVB" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
    <%@ Register TagPrefix="qsf" TagName="Header" Src="~/Common/Header.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="Footer" Src="~/Common/Footer.ascx" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <qsf:headtag id="Headtag1" runat="server"/>
        
    </head>
    <body class="BODY">
        <form id="form1" runat="server">
                             
            <qsf:header id="Header1" runat="server" NavigationLanguage="VB"/>
         <telerik:RadScriptManager ID="ScriptManager1" runat="server" />
        
            <qsf:InformationBox ID="InformationBox1" runat="server" Title="The size of the content loaded in RadEditor below is 1.25 MB (1,313,683 bytes).">
            </qsf:InformationBox>

         <telerik:radeditor runat="server" ID="RadEditor1"
                ContentFilters="None"
                StripFormattingOptions="NoneSupressCleanMessage">
                <Tools>
                    <telerik:EditorToolGroup Tag="MainToolbar">
                        <telerik:EditorTool Name="FindAndReplace" />
                        <telerik:EditorSeparator />
                        <telerik:EditorTool Name="Cut" />
                        <telerik:EditorTool Name="Copy" />
                        <telerik:EditorTool Name="Paste" ShortCut="CTRL+V" />
                    </telerik:EditorToolGroup>
                    <telerik:EditorToolGroup Tag="Formatting">
                        <telerik:EditorTool Name="Bold" />
                        <telerik:EditorTool Name="Italic" />
                        <telerik:EditorTool Name="Underline" />
                        <telerik:EditorSeparator />
                        <telerik:EditorTool Name="ForeColor" />
                        <telerik:EditorTool Name="BackColor" />
                        <telerik:EditorSeparator />
                        <telerik:EditorTool Name="FontName" />
                        <telerik:EditorTool Name="RealFontSize" />
                    </telerik:EditorToolGroup>
                </Tools>
            </telerik:radeditor>
           
           
            <qsf:footer runat="server" id="Footer1"/>
        </form>
    </body>
    </html>

Get more than expected!

 
 

Take your time to truly experience the power of RadControls for ASP.NET AJAX with a free 60-day trial backed up by Telerik’s unlimited dedicated support.

Download your RadControls for ASP.NET AJAX trial and jumpstart your development with the available Getting Started resources.

If you have any questions, do not hesitate to contact us at sales@telerik.com.

Copyright 2002-2024 © Telerik. All right reserved
Telerik Inc, 201 Jones Rd, Waltham, MA 02451