Search This Blog

Tuesday, March 15, 2016

Speeding the Model Editor up for large data models by disabling the Linked Nodes feature - YOUR FEEDBACK IS NEEDED!

We have recently received an inquiry from a customer who experienced low performance and intensive CPU utilization when opening the Model Editor for quite a complex project...Here I wanted to share a simple tip (+ short survey in the end!) that has helped that guy to improve the situation a lot in his particular project. To refresh your memory about 'Linked Nodes' (or Links as you see it in the Model Editor), let me quote our online documentation:

Certain nodes have a "virtual" child node named Links. Under this node, you can see nodes that contain references to the current node. The screenshot below illustrates the Department node of the IModelClass type. Within the Links node, you can see the Creatable Item for the Department object, Members of the Department type and Views designed for the Department type.



Our performance tuning tip is to disable this feature if you do not really use it or if it causes performance problems when the data model is really complex. Thus a lot of calculations are required to detect all dependencies aka linked nodes.

To apply this tip, set the static DevExpress.ExpressApp.Win.Core.ModelEditor.ExtendModelInterfaceAdapter.LinksEnabled property in the constructor of your WinForms ModuleBase descendant in the YourSolutionName.Module.Win/Module.xx file:



[C#]
namespace MainDemo.Module.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.

Please comment on whether you:
Q1: dealt with this sort of problems in the past and whether the suggested solution helps you
Q2: ever used this 'linked nodes' feature.

I am looking forward to hearing from you. Thanks in advance!

UPDATE:
See also:

Disabling/enabling the Linked Nodes feature in the Model Editor (UPDATE for v15.2.9)

16 comments:

  1. Oh, need to immediately test this. fighting with a slow editor quite a long time now.

    ReplyDelete
    Replies
    1. Thanks, Noxe. Please log tickets via the Support Center if you experience performance problems of any kind related to our components so we can help with solutions.

      Delete
  2. What do I do if I have a web-only solution and want to improve model opening time at design time?

    Thanks, Andi

    ReplyDelete
    Replies
    1. This trigger is not currently available for Web projects...
      In fact, I was also thinking about this before publishing this tip and suggested either a check box in the toolbar or context menu for a end-user to change without any code. Anyway, I appreciate your feedback and we will see how it can be improved further.

      Delete
  3. Excellent, added and found way better already
    Thanks

    ReplyDelete
  4. Q1: Yes
    Q2: Yes, a lot, but only the linked "Views" feature

    ReplyDelete
  5. Q1: Yes, this tip significantly speeds up the Model Editor. I often wondered how to turn off the background detail generator thread that was triggered when browsing the Views node – this seems to do it - thanks !
    Q2: Yes, I have used the Links nodes, but only rarely.

    ReplyDelete
  6. Hi,

    My platform agnostic model is currently 1.729Kb in size, not sure how "big" that is compared to others.

    q1: Yes, but not sure if this tweak helps or not, didn't become snappy or anything
    q2: I think I never used Links node

    ReplyDelete
  7. Q1: Absolutly YES! This speeds up the model verry much for our 'big and complex' model.
    Q2: No

    ReplyDelete
  8. Q1: Yes, and I must admit I've tested this immediatelly and seems a bit faster.

    Q2: Yes, liked views only, but I will probably give it up for a speed increase on model editor.

    ReplyDelete
  9. Hi,
    we already use this boolean for a while, because of performance. So Q1: yes absolutely; Q2: rarely, although sometimes helpful
    This asynchronous feature of collecting linked nodes even crashes the model editor for very complex projects. After disabling this we never had problems anymore.

    ReplyDelete
  10. Thanks for your feedback! Based on your answers, I think that my initial idea to disable these links by default is still valid. Adding an option for end-users to enable/disable this functionality in the Model Editor UI can make sense as well.

    ReplyDelete
  11. It's nice news.
    All our projects complex and new option will be very usefull.
    I can't remember when I used Links node

    ReplyDelete
    Replies
    1. We're happy to hear that you find this small feature useful, Sergey!

      Delete