Skip to content

Commit

Permalink
Load pub. details in large batches from JSON files
Browse files Browse the repository at this point in the history
Previously we were loading very slowly, one at a time as each
publication was processed.

Refs #1779
  • Loading branch information
kimrutherford committed Feb 21, 2019
1 parent b974de5 commit 79a0abd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Canto/Track/LoadUtil.pm
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,9 @@ sub create_sessions_from_json

my @results = ();

# load the publication in batches in advance
PubmedUtil::load_by_ids($config, $self->schema(), [keys %$sessions_data], 'admin_load');

while (my ($pub_uniquename, $session_data) = each %$sessions_data) {
my ($pub, $error_message) = $self->load_pub_from_pubmed($config, $pub_uniquename);

Expand Down

0 comments on commit 79a0abd

Please sign in to comment.