loculus-project / loculus

An open-source software package to power microbial genomic databases
https://loculus.org
GNU Affero General Public License v3.0
37 stars 2 forks source link

Is getSequences endpoint really used in full by anything? It seems no longer fit for purpose: should it be replaced? #3280

Open corneliusroemer opened 4 days ago

corneliusroemer commented 4 days ago

get-sequences endpoint currently does all of the following:

Parts of it are used in the following places by the website (afaict):

I couldn't find anything that uses all of the other columns: in particular the data use terms seem to be joined for no reason. There's no user of it.

It looks like we could serve the current website much leanly by:

It's better to make a new dedicated endpoint if we need more stuff rather than having huge beasts that do lots of things but are slow and complicated as a result.

corneliusroemer commented 4 days ago

I looked into it and we do use almost all the fields, including data use terms. Current situation is not a problem anymore now that we've got #3279 - if we find it getting slow again we can reconsider.

corneliusroemer commented 4 days ago

If we separated the counts and the data to show on the cards, we could cache the data on the cards. That way we wouldn't have to repeatedly transfer large amounts of data every second, only do it initially.

Would be easy to use caching similar to what we've got already:

50 requests aren't that bad, but they are also not great.

Overall this is now a small issue, not a big one as we've solved perf.