Book a Demo

Author Topic: Slow save speed when using relatedElements and Decorations  (Read 5457 times)

Mats Gejnevall

  • EA User
  • **
  • Posts: 98
  • Karma: +1/-0
    • View Profile
Hi
We are using Decorations and relatedElements for all the elements in our MDG. But when the size of some the diagrams increased, the time to save a diagram went up to 30 seconds for .EAP and 90 seconds for a database save.

Has anyone else encountered this and were you able to solve it, instead of creating smaller diagrams? About 60 elements in these diagrams!

Thanks
Mats

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Slow save speed when using relatedElements and Decorations
« Reply #1 on: May 16, 2017, 11:36:48 pm »
Probably everyone using shape scripts in masses. Each shape script is interpreted when it appears on a diagram. The more elements on a diagram, the longer it will take. Just try to reduce the number of elements on a single diagram. That will not only speed up loading, it will also help making diagrams more readable for humans.

q.

Mats Gejnevall

  • EA User
  • **
  • Posts: 98
  • Karma: +1/-0
    • View Profile
Re: Slow save speed when using relatedElements and Decorations
« Reply #2 on: August 23, 2017, 09:53:18 pm »
But I think there should be some way of turning off the relatedElements temporarily. I can do it by turning off the metamodel, but that can corrupt my models. It might be possible to create some shape script inside each relatedElement script to do that, but again to complicated.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Slow save speed when using relatedElements and Decorations
« Reply #3 on: August 23, 2017, 10:01:46 pm »
I think the problem bites you at the right location. You should reduce the number of elements per diagram. Nobody can cope with 60 elements in a diagram. I think that 10-15 should be the maximum elements per diagram.

q.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Slow save speed when using relatedElements and Decorations
« Reply #4 on: August 23, 2017, 10:41:25 pm »
But I think there should be some way of turning off the relatedElements temporarily. I can do it by turning off the metamodel, but that can corrupt my models. It might be possible to create some shape script inside each relatedElement script to do that, but again to complicated.

One way of working around this problem might be to duplicate each custom diagram type, naming the duplicates "bla bla - sketch" or similar. You can then check the diagram.type or diagram.mdgtype property in the shape scripts. Switching between diagram types is easy and, provided you've set them up with the same toolboxes, seamless.

How well this works I couldn't say. The shape scripts would still get executed, but they'd issue fewer drawing commands.

/U
My theories are always correct, just apply them to the right reality.