Skip to content

Conversation

@olovy
Copy link
Contributor

@olovy olovy commented Jun 7, 2022

  • Use whelk.bulkLoad when loading data for Normalizers
  • Actually bulk load documents in one query in bulkLoad

This cuts the normalizer initialization part of of Whelk startup from ~20 to ~2 seconds when connecting to e.g. QA database from my laptop over VPN.

@olovy olovy requested review from andersju, lrosenstrom and niklasl June 7, 2022 15:36
return (o instanceof List) ? (List) o : o != null ? [o] : []
}

static boolean looksLikeIri(String s) {
Copy link
Contributor Author

@olovy olovy Jun 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From #1009

@olovy olovy force-pushed the feature/bulk-load branch from ec7f4be to b5e8477 Compare June 8, 2022 08:36
Copy link
Member

@andersju andersju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! LGTM!

@olovy
Copy link
Contributor Author

olovy commented Jun 8, 2022

In theory this could starve the connection pool since the connection is held for one larger query. We have a limit of 100 docs in place in reindex so it should be fine.

Fix this when we split the connection pool in two for fast and slow transactions.

@olovy olovy merged commit ecaae76 into develop Jun 8, 2022
@olovy olovy deleted the feature/bulk-load branch June 8, 2022 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants