+ # Run the before_save and before_create callbacks, and then import them in bulk with activerecord-import
+ tracepoints.each do |tp|
+ tp.run_callbacks(:save) { false }
+ tp.run_callbacks(:create) { false }
+ end
+ Tracepoint.import!(tracepoints, :batch_size => 1_000)
+
+ if gpx.actual_points.positive?