Ticket S31088
Visible to All Users

Performance.Web - Share common parts of the application model to reduce startup time and memory use

created 16 years ago
Comments (3)
DevExpress Support Team 16 years ago

    Currently, as a workaround, you can use this approach:

    C#
    protected void Session_Start(Object sender, EventArgs e) { lock (this) { if (parameters == null) { DictionaryNode.ReaderWriterLockWrapperCreator = new ReaderWriterLockWrapper(); XafApplication dummyApplication = new MainDemoWebApplication(); dummyApplication.SettingUp += new EventHandler<SetupEventArgs>(dummyApplication_SettingUp); dummyApplication.Setup(); } MainDemoWebApplication application = new MainDemoWebApplication(); if (application.Security != null) { SecuritySystem.SetInstance(application.Security); } WebApplication.SetInstance(Session, application); application.MySetup(parameters); } if (ConfigurationManager.ConnectionStrings["ConnectionString"] != null) { WebApplication.Instance.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString; } WebApplication.Instance.Start(); } ExpressApplicationSetupParameters parameters; void dummyApplication_SettingUp(object sender, SetupEventArgs e) { parameters = e.SetupParameters; }

    Feel free to contact us in case of any difficulty.
    Thanks,
    Dan

    Dennis Garavsky (DevExpress) 16 years ago
      Dennis Garavsky (DevExpress) 13 years ago

        The improvement described in this suggestion was implemented during the application model improvements done in the v2010 vol 1 release. Starting with this version, common parts of the application model are setup only once for the global HttpApplication.
        Thanks,
        Dennis

        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.