feat(components): mutations over time: do not query mutations if explicit list is given#1100
Open
feat(components): mutations over time: do not query mutations if explicit list is given#1100
Conversation
…icit list is given
This comment was marked as off-topic.
This comment was marked as off-topic.
9b2c7ef to
c89a459
Compare
c89a459 to
0196e75
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolves #1099
Problem
We always query for all mutations in the date range, and also for all their counts and coverage. This is quite an expensive call to make, with the current 200 Million covid sequences, for the whole date range, this takes about 3 seconds. We make this call also if we only request a single mutation.
Solution
The call was done for two reasons:
For 1., we still query LAPIS to get the list; there is no way around this. But for 2., we can actually get all this data (counts, coverage) from the mutations-over-time call we make next. This PR does exactly that. Now for user provided mutation lists, we save the API call.
Tests, Screenshots
Some rows are now gone, some added, I skimmed it and it looks good to me. The changes are IMO because the calculations are sometimes slightly differently rounded? Or in some cases the data was edited manually anyways so two API calls don't correlate correctly.
PR Checklist
All necessary documentation has been adapted.