Skip to content

Commit

Permalink
lower chunk size
Browse files Browse the repository at this point in the history
  • Loading branch information
kylerchin committed Oct 20, 2024
1 parent 9623c74 commit 55af79d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/maple/gtfs_process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pub async fn gtfs_process_feed(
let gtfs = gtfs_structures::Gtfs::new(path.as_str())?;

println!(
"Finished reading GTFS for {}, took {:?}",
"Finished reading GTFS for {}, took {:?}ms",
feed_id, gtfs.read_duration
);

Expand Down Expand Up @@ -326,7 +326,7 @@ pub async fn gtfs_process_feed(
})
.collect();

for dir_chunk in direction_pattern_rows.chunks(100) {
for dir_chunk in direction_pattern_rows.chunks(50) {
diesel::insert_into(catenary::schema::gtfs::direction_pattern::dsl::direction_pattern)
.values(dir_chunk)
.execute(conn)
Expand Down Expand Up @@ -384,7 +384,7 @@ pub async fn gtfs_process_feed(
})
.collect::<Vec<_>>();

for itinerary_chunk in itinerary_pg.chunks(100) {
for itinerary_chunk in itinerary_pg.chunks(50) {
diesel::insert_into(catenary::schema::gtfs::itinerary_pattern::dsl::itinerary_pattern)
.values(itinerary_chunk)
.execute(conn)
Expand Down Expand Up @@ -480,7 +480,7 @@ pub async fn gtfs_process_feed(
})
.collect();

for routes_chunk in routes_pg.chunks(100) {
for routes_chunk in routes_pg.chunks(50) {
diesel::insert_into(catenary::schema::gtfs::routes::dsl::routes)
.values(routes_chunk)
.execute(conn)
Expand Down

0 comments on commit 55af79d

Please sign in to comment.