Skip to content

Optimize VA-Spec Object Creation #560

@bencap

Description

@bencap

VA-Spec object creation can take upwards of a minute and a half for score sets with large numbers of variants, and we should seek ways that might improve the response time of endpoints creating variant annotation objects. Although the size of the response is large, the main areas for savings are likely to be:

  • The creation of each VA-Spec object (we loop individually through each mapped variant to create the objects)
  • The serialization and validation of Pydantic objects in the response (we must validate each object in the response list)

We might consider:

  • Paginating responses
  • Streaming responses
  • Limiting the use of Pydantic:
    • Deferring the creation of VA-Spec objects until the response, or
    • Modeling the response as a simpler data structure to limit validation upon returning models
  • Processing jobs in the background (probably not worth it)
  • Adding better timing metrics to these functions

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions