hodcroftlab / covariants

Real-time updates and information about key SARS-CoV-2 variants, plus the scripts that generate this information.
https://covariants.org/
GNU Affero General Public License v3.0
316 stars 112 forks source link

Split web data into chunks #303

Open ivan-aksamentov opened 2 years ago

ivan-aksamentov commented 2 years ago

The following JSON files contain data collections in array formats:

Currently, the entire array needs to be downloaded every time, even if only some items are needed. In fact, the full download is always happening on page load, because the static import is used (see https://github.com/hodcroftlab/covariants/issues/302). This worked well in the beginning and we all hoped that pandemic is almost over back then. However, after more than a year, the data sizes have grown and mono-array is not an adequate solution anymore.

We could split the arrays into elements and allow the app to operate on individual items ("chunks"). Due to a sheer volume, we've already done this for acknowledgements data. Now it's time to transition the rest of data.

Steps:

This makes the most sense after or together with https://github.com/hodcroftlab/covariants/issues/302, because it will revamp the whole web app logic. We don't want to do this twice.