This is due to the fact that the corresponding
uniqueflag set to
true. EMF makes sure each element appears only once in the list of that reference. This is good, but performs poor for big growing lists.
As I construct the model from scratch I can make sure there will be no duplicates. So instead of
I cast to
In my case, that reduced the execution time to a fifth !