Skip to content

Research: Bad App performance when lots of data is present, SP=8

When the user has stored 1.5 years worth of data, the app stops working properly in various parts, specifically:

  • answering questions (probably connected to the date picker?)
  • sending the data (see #894 (closed))

This task is only about figuring out what is happening – JS should be able to handle that amount of data (~300k) For example data ask @alohannu

Timebox: 1 week

1st findings

  • The query runner does in fact open after 1m30s. (05.03) ->
  • Extending the time for the transfer could make it work.
  • Change the procedure to only load the questions which are relevant to the day? (05.03)

2nd findings

  • Through the performance scanner of the browser dev tools, it was discovered that DayQueryService.getQueryControl()s is called once in the beginning and within that DayQueryService.getQueryControl() is being called for each day of a SymptomCheck, of which the first instance of that takes up 150 to 250 ms. This was previously needed to give the DatePicker the necessary information about how many questions were answered to display X/Y beneath each date. Due to the Promise.all() the loading of the query run page takes that much time. (12.03) ->
  • Replace the Promise.all()with a resolve that starts with the end date and allows the page to finish loading the current date query run page. Let the rest of the queryControls be loaded in reverse order.

JSON file with performance when opening query run

Trace-20240315T180753.json

Edited by Hanhoan Truong