someshkar/covid19india-cluster

Performance Issue | Excessive if/else checks in data parsing module

Opened this issue · 1 comments

Describe the bug
There are excessive if/else checks in the data parsing module which is the reason why the website is taking more time to reflect the data on the first load and also when the data is fetched again(triggered from the header.js and DataPicker.js)

To Reproduce

  1. Go to 'https://cluster.covid19india.org/'
  2. Try changing the date or updating the checkbox in the header.
  3. It takes a very long time to reflect on the latest fetched data.

Expected behavior
The parsing of the data can be improved to increase performance.

Desktop:

  • OS: MacOS
  • Browser: chrome
  • Version: 80.0.3987.149

have added a fix in this PR. Please check.