Skip to content

Refactor: prefetch all required datasets for creation of entities from submissions#1737

Merged
sadiqkhoja merged 1 commit intogetodk:masterfrom
sadiqkhoja:refactors/prefetch-datasets-for-entity-processing
Jan 28, 2026
Merged

Refactor: prefetch all required datasets for creation of entities from submissions#1737
sadiqkhoja merged 1 commit intogetodk:masterfrom
sadiqkhoja:refactors/prefetch-datasets-for-entity-processing

Conversation

@sadiqkhoja
Copy link
Copy Markdown
Contributor

@sadiqkhoja sadiqkhoja commented Jan 21, 2026

Change:

Currently when there are multiple entities in a submission, our submission processing code fetches dataset information for each entity separately, even if all entities belong to the same dataset. In the PR, I have optimized that code, so now it first gets the all distinct dataset names from the submission and then fetches all of them in a single SQL command. After that the corresponding dataset information is passed downstream function.

What has been done to verify that this works as intended?

All tests are passing.

Why is this the best possible solution? Were any other approaches considered?

Nope.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

Nope.

Does this change require updates to the API documentation? If so, please update docs/api.yaml as part of this PR.

NA

Before submitting this PR, please make sure you have:

  • run make test and confirmed all checks still pass OR confirm CircleCI build passes
  • verified that any code from external sources are properly credited in comments or that everything is internally sourced

@sadiqkhoja sadiqkhoja requested a review from ktuite January 21, 2026 20:07
@sadiqkhoja sadiqkhoja merged commit 46126be into getodk:master Jan 28, 2026
5 checks passed
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.

2 participants