Skip to content

Improve fetching speed by allowing for including more of records#809

Merged
bennybp merged 36 commits into
mainfrom
query_include
Apr 7, 2024
Merged

Improve fetching speed by allowing for including more of records#809
bennybp merged 36 commits into
mainfrom
query_include

Conversation

@bennybp

@bennybp bennybp commented Mar 26, 2024

Copy link
Copy Markdown
Contributor

Description

Right now, when records are fetched from the server, only the bare minimum is fetched, with the rest coming on-demand as you access fields of the record. This works in general, however if the user wants to download entire records (+ children), the result is a very large number of small requests.

This PR improves this. There are three main parts:

  1. Being able to say include=['**'], which will result in the entire record being downloaded, including children

  2. To handle fetching children, the children of multiple parent records are fetched together. For example, singlepoint records from the trajectories of multiple optimization records are batched together.

  3. A time-based chunking iterator to help prevent very large requests from choking the server. This also includes a thread pool for background fetching

This requires a few server side changes, so unfortunately this cannot be tested against the running production servers. I am planning on a release in early April, though.

Changelog description

Improve fetching speed by allowing for including more of records

Status

  • Implement new includes handling and child fetching
  • Time-based chunking iterator
  • Code base linted
  • Ready to go

@bennybp bennybp merged commit f0cd183 into main Apr 7, 2024
@bennybp bennybp deleted the query_include branch April 7, 2024 13:33
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.

1 participant