I am using Room as an abstraction layer over SQLite. After reading this page I found out that we can insert multiple objects at the same time. Currently I use a For loop to insert objects, i.e one object in each For loop iteration. The two ways of inserting that I know of currently are:
Using a For loop and inserting each object one at a time
@Insert(onConflict = OnConflictStrategy.REPLACE) public void addActivity(Person person);
Inserting an array or a list of objects.
@Insert(onConflict = OnConflictStrategy.REPLACE) public void insertUsers(Person ... people);
When I was coding the insertion of objects, I did not know of the second way of insertion. Now I want to know if there is any noticeable difference in speeds between the two ways so that I can change my code to increase performance of my app.