We have some categories with 10's of thousands of products in them for organizational purposes. Adding products to one of the categories (as a non-primary relation) can take a long time (> 1 min) when using the Commerce Shell.
I see that the RelationStore Rest API in the commerce shell package seems to be creating writeable clones of all the relations for a parent before modifying any relation for the parent. Perhaps that is an expensive operation to do with 10's of thousands of relations?
If this is correct, is there a maximum number or recommended limit of products/variations (Catalog Entries) that should belong to a category (Node)?
If that's not a correct assessment of the catalog rest api's behavior, is there some other step I can take to troubleshoot?