Ticket T356159
Visible to All Users

Model Editor So Slowly

created 9 years ago

Hi,

I have a problem with model editor is in runtime, it uses approximately 40 percent of CPU when model editor opened and it takes  about 5 minutes. This problem affects usage of model editor by end user. For example, when user try to add new element to model, model editor is locked and user can not use model editor until CPU is free. According to debugs that I made, there is no problem in form constructor. In another test, I used the following code in application opening process:

C#
ITypeInfo tiModelApplication = typesInfo.FindTypeInfo(typeof(IModelApplication)); tiModelApplication.FindMember("Views").AddAttribute(new System.ComponentModel.BrowsableAttribute(false));

And I examine that model doesn’t use CPU and I can add model element as I expected.
I use Xpand.ExpressApp.ModelDifference.ModelDifferenceModule module in my project, but according to my test I don’t see any problem related with that module. In addition, there is 3266 views on model editor. Does this amount cause of this problem? I am waiting for your reply to solve this problem.

Comments (3)
Dmitry M (DevExpress) 9 years ago

    Hello,
    I suggest you disable the Linked Nodes feature in the model editor. This can lead to significant acceleration of this editor.
    For this, you need to set the ExtendModelInterfaceAdapter.LinksEnabled property value to false in the Main application method.
    I hope you find this information helpful. Please keep us informed of your progress.

    İY İY
    İletişim Yazilim 9 years ago

      Thanks so much, is work

      Dennis Garavsky (DevExpress) 9 years ago

        @İletişim:
        I've posted an update on this at http://dennisgaravsky.blogspot.com/2016/04/disablingenabling-linked-nodes-feature.html
        I hope you find this feature helpful as well.

        Answers approved by DevExpress Support

        created 9 years ago (modified 9 years ago)

        Hello,

        Thank you for informing us of your results. We are happy to hear that setting the static DevExpress.ExpressApp.Win.Core.ModelEditor.ExtendModelInterfaceAdapter.LinksEnabled property  to False in YourSolutionName.Win/Program.xx file has helped you. Alternatively, you can set this static property in the constructor of your WinForms ModuleBase descendant in YourSolutionName.Module.Win/Module.xx file:

        C#
        ... namespace MainDemo.Module.Win { [ToolboxItemFilter("Xaf.Platform.Win")] public sealed partial class MainDemoWinModule : ModuleBase { public MainDemoWinModule() { InitializeComponent(); DevExpress.ExpressApp.Win.Core.ModelEditor.ExtendModelInterfaceAdapter.LinksEnabled = false; ...

        This way the Linked Nodes feature will be disabled not only at runtime, but also at design time for your WinForms module and application projects.

          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.