If you create a group with entities, its much more efficient to create the group first and then add the geometry into it. Optimal way of creating groups via the API is different than from the UI.
Also note that add_group with parameters can produce crashes and other unexpected behavior if those entities aren’t in the active drawing context. I would advise to only use add_group with parameters when there is no other way.