Book a Demo

Author Topic: Why is looping Element.Issues so damn slow  (Read 9011 times)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Why is looping Element.Issues so damn slow
« on: August 24, 2009, 06:53:33 pm »
Anyone ever use the Element.Issues collection?
In my experience this is a very very slow collection, much slower then for example the Attributes or Operations and I don't really see why this should be the case.

Geert

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Why is looping Element.Issues so darn slow
« Reply #1 on: August 25, 2009, 12:45:43 am »
Perhaps that's one of the "issues" with the collection.

Sorry, I just couldn't resist...   :D
No, you can't have it!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Why is looping Element.Issues so darn slow
« Reply #2 on: August 25, 2009, 02:47:07 am »
Still this is pretty weird.
I'm writing a model validation add-in, and I'm using the issues to keep track of the rule violations per element.
Most of the elements have at most 10 issues.
When profiling my add-in it shows that it spends 75% of the runtime retrieving those issues.
Mind you that the program visits all elements, operation, attributes, and connectors in a hierarchical manner and it performs some "heavy" rule validations including xml parsing of the notes. (which I suspected to be the bottleneck)
There must be something very wrong with the way the issues collection is retrieved from the database.
I've checked the db schema, but there is an index on the t_objectProblems.Object_ID, so it can't be that either.

Geert

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Why is looping Element.Issues so darn slow
« Reply #3 on: August 25, 2009, 03:20:53 am »
Is this problem sensitive to the DBMS you are using for the repository?
No, you can't have it!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Why is looping Element.Issues so darn slow
« Reply #4 on: August 25, 2009, 03:56:25 am »
Both on SQL server as on a local EAP file I experience the same slowness.

Geert

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Why is looping Element.Issues so darn slow
« Reply #5 on: August 25, 2009, 11:00:47 pm »
Oh well... I guess you had best be off to Sparx with a bug report then.
No, you can't have it!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Why is looping Element.Issues so darn slow
« Reply #6 on: August 25, 2009, 11:02:54 pm »
Was afraid so. Will do.