I develop an App and recently I’ve caught me on the thought. What of the following has better performance?
- Perform single commit of 1000 entities.
- Perform 20 commits with 50 entities at each commit.
And how do you think will it be implementation dependable?
The only way to know is to test – you need to test with both options multiple times, with realistic data to find out which one will perform better.
In general, however, the expensive resources are
Since the amount of data is the same, you are simply creating multiple connections with the second option. This is likely to perform worse than your first option.