What is the best (and most performant) implementation to ensure there are no duplicate DOM instance names for a specific definition, taking into account that we need to support CRUD actions in bulk?

Hi Joey, I’m not sure if it’s the most performant, but I created a script which is executed on DOM instance action settings – OnUpdate (if needed) and OnCreate.
There, with a simple automation script, I check if there is a duplicate name. It’s also executed for each DOM instance individually, which comes with a pitfall, though.
Because the scale of my DOM Definition is not as large as yours, I could afford fetching all DOM instances to check if the name exists.
In your case, you need a “small” caching mechanism.
I have tested a bit with a static Collection or a Set of all names in the script, and it turned out to be working fine, but creating a re-population and synchronization method (in case of process crash, DMA restart, etc.) would be like carrying water to the sea, as I have no more than 200 DOM instances. But that could work in your case.
Another idea are memory files, but I don’t know how performant would they be with the scale you’re operating with. It’s a shot in the dark.
Hope this helps even a bit.
To be more specific, let's assume there are already 100K of these instances, and 10K instances need to be created or updated.