KB Article KA18789
Visible to All Users

Saving an ASP.NET page at design time is very slow in Visual Studio 2013, 2012, 2010

Description:
If you modify an ASP.NET page markup and click the 'Save' tool button (or press the Ctrl+S key combination), the IDE takes much time (20, 30 seconds or even more than a minute) to save a file on a hard drive of your local machine.
Please note that there is another issue that looks similar to this one:
Visual Studio 2013, 2012, 2010 performance is very slow when a page with ASP.NET controls is opened in Designer
However, the sources of these issues are absolutely different. Sometimes they can appear together when you are editing a page and you can think that this is the same issue. It is important to clearly understand what issue you have encountered, because there are different solutions/workarounds.
If you see the following behavior:
- Visual Studio hangs only when you save a file (please note that Visual Studio automatically saves all changed files when you compile a project);
- This occurs always regardless whether you open a page the Design or Split view, or directly edit the page markup;
This means that you encountered the issue described in this article. Please refer to the Solution section and try the suggested approach.
If Visual Studio hangs only when you are changing the page or control settings in the Design or Split view (even if you are using the Properties window to change the settings), but all operates fast if you are editing the Page/UserControl markup and the Design or Split view is not shown, you faced another issue described in the Visual Studio 2013, 2012, 2010 performance is very slow when a page with ASP.NET controls is opened in Designer article.

Answer:
Issue Details
Saving an ASP.NET page at design time is very slow in Visual Studio 2013 (2012, 2010)
If you modify an ASP.NET page markup and click the 'Save' tool button (or press the Ctrl+S key combination), the IDE takes much time (20, 30 seconds or even more than a minute) to save a file on a hard drive of your local machine.
This issue occurs if ASP.NET components are registered in web.config:

XML
<pages validateRequest="false" clientIDMode="AutoID"> <controls> <add tagPrefix="dx" namespace="DevExpress.Web.ASPxClasses" assembly="DevExpress.Web.v12.2, Version=12.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <add tagPrefix="dx" namespace="DevExpress.Web.ASPxCallback" assembly="DevExpress.Web.v12.2, Version=12.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <add tagPrefix="dx" namespace="DevExpress.Web.ASPxCallbackPanel" assembly="DevExpress.Web.v12.2, Version=12.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <add tagPrefix="dx" namespace="DevExpress.Web.ASPxCloudControl" assembly="DevExpress.Web.v12.2, Version=12.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <add tagPrefix="dx" namespace="DevExpress.Web.ASPxDataView" assembly="DevExpress.Web.v12.2, Version=12.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <add tagPrefix="dx" namespace="DevExpress.Web.ASPxFileManager" assembly="DevExpress.Web.v12.2, Version=12.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> ... </controls> </pages>

The issue occurs even if only several controls are registered there. Sometimes the use of third-party assemblies can cause this issue as well (A master page containing DevExpress controls is saved slowly in Visual Studio 2010 if the controls are registered in the web.config file). A master page containing DevExpress controls is saved slowly in Visual Studio 2013 if the controls are registered in the web.config file. We found that if controls belong to different namespaces within the same assembly, Visual Studio iterates through every class several times (for some internal purposes) several times.

Fix for version v14.2+

Starting with version v14.2, we merged namespaces to prevent additional iterations. This completely fixed the issue if you are modifying only the ASPx markup. However, if you switch Visual Studio into either Designer or Split view, the performance issue returns.

We discovered that Visual Studio serializes all public properties of every control in an assembly. Since our controls are extremely customizable, they have hundreds or even thousands of recursive properties. ASPxGridView has more than ten thousands properties! Visual Studio takes significant time to serialize them all. The serialization appears when you save a file. Moreover, even if you switch back to the Source view, this does not solve the issue. The only way to solve it is to close a tab with page markup and re-open it to edit markup if necessary.

So, to resolve the slow saving issue do the following:

  1. Upgrade to version v14.2. or higher.
  2. Do not open either Design or Split view. Use only the Source view to edit markup or control settings.
  3. If you have opened one of the views (e.g., to see control settings in the Properties grid), close the tab with page markup. If you need to continue editing, reopen the markup file and apply the required changes using the Source view only.

Alternatively, you can use the following workaround;

Workaround for versions before v14.2

If you are using a version previous to v14.2, the only way to work around it is to remove the component registration from web.config and register them in page markup:

ASPx
<%@ Register tagPrefix="dx" namespace="DevExpress.Web.ASPxTreeView" assembly="DevExpress.Web.v12.2, Version=12.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" %> <%@ Register tagPrefix="dx" namespace="DevExpress.Web.ASPxSplitter" assembly="DevExpress.Web.v12.2, Version=12.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" %> <%@ Register tagPrefix="dx" namespace="DevExpress.Web.ASPxEditors" assembly="DevExpress.Web.v12.2, Version=12.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" %> <%@ Register tagPrefix="dx" namespace="DevExpress.Web.ASPxGridView" assembly="DevExpress.Web.v12.2, Version=12.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" %> <%@ Register tagPrefix="dx" namespace="DevExpress.Web.ASPxClasses" assembly="DevExpress.Web.v12.2, Version=12.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" %> <%@ Register tagPrefix="dx" namespace="DevExpress.Web.ASPxCallbackPanel" assembly="DevExpress.Web.v12.2, Version=12.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" %>

See Also:
Visual Studio 2013, 2012, 2010 performance is very slow when a page with ASP.NET controls is opened in Designer

Show previous comments (73)
RT RT
Reidar Thorsvik 9 years ago

    Does this mean that the 15.2 version has better performance on saving, cause I still have tremendous problems with the speed.
    I use Windows 10 on a good computer and devexpress ver. 15.1.8

    M M
    Matthew G. McCracken 9 years ago

      I have noticed significant performance gain with Visual Studio 2015 with 15.x.
      It can still be slow, but it hasn't frozen on me for a while like it did in VS 2013.

      DevExpress Support Team 9 years ago

        Starting with version 14.2, saving performance should be solved in all supported Visual Studios. On the other hand, when we were fixing this issue, Visual Studio 2015 was not released yet. If saving changes is still slow in your projects, would you please send me them for research.
        Please also note that there is another issue related to Visual Studio Design mode. It also affects page performance and looks the same at first glance. However, it has a different cause; see Visual Studio 2013, 2012, 2010 performance is very slow when a page with ASP.NET controls is opened in Designer for details.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.