REAL performance improvement in importer - using a bulk insertion

This commit is contained in:
Rodrigo Damazio
2010-08-13 03:50:55 -03:00
parent c84a4f1aa8
commit 32b8b2093d
5 changed files with 216 additions and 89 deletions
@@ -232,6 +232,17 @@ public interface MyTracksProviderUtils {
*/
Uri insertTrackPoint(Location location, long trackId);
/**
* Inserts multiple track points in a single operation.
*
* @param locations an array of locations to insert
* @param length the number of locations (from the beginning of the array)
* to actually insert, or -1 for all of them
* @param trackId the ID of the track to insert the points into
* @return the number of points inserted
*/
int bulkInsertTrackPoints(Location[] locations, int length, long trackId);
/**
* Inserts a waypoint in the provider.
*
@@ -262,7 +273,7 @@ public interface MyTracksProviderUtils {
* @param cursor a cursor pointing at a db or provider with locations
* @return a new location object
*/
public Location createLocation(Cursor cursor);
Location createLocation(Cursor cursor);
/**
* Creates a waypoint object from a given cursor.
@@ -270,7 +281,7 @@ public interface MyTracksProviderUtils {
* @param cursor a cursor pointing at a db or provider with waypoints.
* @return a new waypoint object
*/
public Waypoint createWaypoint(Cursor cursor);
Waypoint createWaypoint(Cursor cursor);
/**
* A factory which can produce instances of {@link MyTracksProviderUtils},