Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clinvar export is slow for large cohort #302

Closed
holtgrewe opened this issue Jan 29, 2022 · 2 comments · Fixed by #316
Closed

Clinvar export is slow for large cohort #302

holtgrewe opened this issue Jan 29, 2022 · 2 comments · Fixed by #316
Assignees
Labels
bug Something isn't working

Comments

@holtgrewe
Copy link
Collaborator

Describe the bug
The clinvar export Vue app loads for a very long time for larger cohorts.

To Reproduce
Steps to reproduce the behavior:

  1. Create a project with many cases and annotated variants.
  2. Open the clinvar export tool for that project
  3. The clinvar export will load for minutes

Expected behavior
The clinvar export should load more quickly.

Screenshots
N/A

Additional context
N/A

@holtgrewe holtgrewe added the bug Something isn't working label Jan 29, 2022
@holtgrewe holtgrewe self-assigned this Jan 29, 2022
@holtgrewe holtgrewe added this to the athenea-1.1.0 (RC) milestone Jan 29, 2022
@holtgrewe
Copy link
Collaborator Author

Root Casue Analysis
The main issue is that the clinvar export Vue.js app loads all user annotations eagerly on startup. In one project we have ~10k of such annotations which generates about 40MB of JSON before it is sent to the browser. Of course, all of the data sets have to be pulled from the database before. The same is true for the cases in the project but these are currently "only" ~500 which is not critical.

@holtgrewe
Copy link
Collaborator Author

Resolution Proposal
We need to load the data more lazily from the server. For this the following changes should be made:

  • Do not load variant annotation data on startup of the Vue.js app.
  • Change UI for adding variants such that the user must first select the case that they want to add variants for.
  • Only then load the variant annotation data for the case. The UI should work the same except for this point.
  • Adjust the REST API client and server code such that the variant annotation information for the annotated variant is loaded on Vue.js app startup.

Affected Components

  • VarFish Server
    • clinvar_export module, REST API
    • Vue.js app in varfish/vueapp

Affected Modules/Files

  • varfish/vueapp/*
  • clinvar_export/views.py, possibly also models.py

Required Architectural Changes

  • Vue.js application needs some refactoring to load less data in the beginning and load data more lazily from the REST API otherwise.

Resolution Sketch

  • REST API should return only variant annotations for variants in submission
  • REST API should have option to use annotations for one specific case
  • Vue.js code needs to load the data for a specific case, UI forces user to select a case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant