Hi Stoyan,
I have performance issues with my bigger diagrams.
My biggest has "only" 310 tableNodes, 40 containerNodes and many links.
A) Loading diagram from data (not using LoadFromXml at all):
-1- Adding ShapesNodes takes forever (minutes
). If I disable that, it makes a big difference. Each of my table has two shapesnodes attached. One of them changes when I click on it. The other one never changes, but might have to be hidden (the first one is used to fold my tableNode i.e. showing only the caption).
-1a- Can I manually paint the tableNodes?
-1b- Can I reuse the same ShapeNode or is there a way to make diagram.Factory.CreateShapeNode faster?
-2- RouteAllLinks is another bottle neck. I call it only once at the end of my loading, but it is taking a long time. How can I optimize it?
-3- this.diagram.add(myTableNode) is the 3rd bottleNeck. Is there any way to make it faster?
-4- You talked in other posts about not including the diagram in a view at loading time. The loading can occur after another diagram has been drawn (I then clear everything before adding my new elements). Can I unattach my diagram from its view and add it back after loading is done? Would it help? I don't need any painting done during the load. Only the final result matters.
-5- I am adding my nodes & links at the same time. Would it make a big difference to add all nodes first than rescan everything to add my links?
B) Every action done takes time. By example, selecting, moving or resizing a node is long. Folding a container took me 420secons (running profiler so it should be at least twice faster usually). It spent half the time calling DiagramNode.Resize and the other half calling Diagram.RouteAllLinks). How can I make my UI much faster?
C) How much speed gain could I expect? Now it can take up to 10 minutes loading that diagram (and I've got a good computer) and 15 seconds to 5 minutes doing a simple action after loading.
D) Any other ideas/suggestions?
Sorry for the many questions...
Thanks a lot!
Marie