Hello,
this is a general question more about increasing my knowledge/understanding than really solving a problem.
I have a C# program where I access EAs object model (
https://sparxsystems.com/enterprise_architect_user_guide/14.0/automation/theautomationinterface.html) via COM objects. Normally I first iterate through all packages (recursively) to get all the existing wanted elements into my data structure. For example elements can be stored in my C# program as
public class EaElement(EA.Element e, string parentFullName)
{
public readonly EA.Element E = e;
public readonly string Name = e.Name;
public readonly string FullName = parentFullName + "/" + e.Name;
}
So later I can use my C# internal data to find the related elements.
On the other hand I could also store only the ID of the element (not the object reference) and query the real element always from the repository.
With my currently used object storing I have a somewhat bigger amount of COM objects in my data. Could this be a problem? I'm not 100% sure about those object lifetimes and whether there is a limit in the number.
Sometimes I got a COM exception when try to use such an object. Or even not all objects seems to be returned from my first "object gathering". But that's quite seldom and might be more that I created some garbage when developing my C# program and stop "somewhere in the middle". This is more a feeling than a fact.
EA documentation talks always about tables. And I know that internally there is a (SQL?) database that holds the data in tables (as normal SQL databases do). Would it be better or even more performant to get this table content directly? I wouldn't know how. But at least in the beginning, where I first gather the information what is all existing in my model, this might be a better way.
I'm pretty sure there are many people outside that have more knowledge about this issue than i. May be they can share some info that increases my knowledge