onaio / tally-ho

Election results data entry and verification software.
http://tally-ho.readthedocs.org/en/latest/
Other
19 stars 21 forks source link

Improve Report Loading Performance on Public Facing site #351

Open KipSigei opened 2 years ago

KipSigei commented 2 years ago

Upon initial site load, we normally aggregate data from the first admin level (Region) to the last level (Station). This initial process is quite heavy for the front end code since we need to iterate through several reports which include:

The largest report so far is the forms list report followed by the results report, which both have a combination of parliamentary and presidential data. As a temporary solution, we have added logic that aggregates data from the highest to the lowest admin level and set it to local storage, meaning the only time the user will experience latency is on initial load, and when drilling down to the other levels there's no significant latency experienced. We need to find a way to improve the initial load performance, maybe by splitting the files based on the race type, or have this data pre-aggregated from the tally system.