GeriLife / wellbeing-client

Client-only code for Wellbeing project.
Apache License 2.0
0 stars 0 forks source link

Adding activity count chart by homeId #62

Closed shailee-m closed 3 years ago

shailee-m commented 3 years ago

closes https://github.com/GeriLife/wellbeing/issues/588

brylie commented 3 years ago

How quickly does this chart render on a medium-sized data set? Please create one year of mock data with around 1000 activities per home per month and benchmark the chart.

shailee-m commented 3 years ago

How quickly does this chart render on a medium-sized data set? Please create one year of mock data with around 1000 activities per home per month and benchmark the chart.

@brylie Screenshot from 2021-08-29 23-36-34

For around 100,000 activities (9 homes; activities of 12 months), the plotly rendering gets slower. (For a single home there should be approximately 12000 data points) for each chart. The APIs respond in under 1 second but with 2 charts on the page and 12000 data points, the plotly rendering slows down.

We could try adding more filters/chart settings in the frontend to restrict the data shown e.g. a date range. Also, we can look into other libraries that can be faster than plotly. Also, the page hangs a little.

brylie commented 3 years ago

For around 100,000 activities (9 homes; activities of 12 months), the plotly rendering gets slower. (For a single home there should be approximately 12000 data points) for each chart. The APIs respond in under 1 second but with 2 charts on the page and 12000 data points, the plotly rendering slows down.

For one home there should be 365 or 12 data points, depending on whether we aggregate by day or month. So, chart performance isn't the concern.

What I would like to establish is how quickly the server can aggregate the 365 (daily) or 12 (monthly) data points for a single home with a high number (~12,000) of activities.

Notes: the mock data generator will generate data for multiple homes, which is alright. Since the task is to produce an aggregate chart for a single home, we just need to generate enough mock data so there is around 12,000 activities for a single home. Then, benchmark the server performance for a single home daily/monthly activity aggregates over one year.

shailee-m commented 3 years ago

For around 100,000 activities (9 homes; activities of 12 months), the plotly rendering gets slower. (For a single home there should be approximately 12000 data points) for each chart. The APIs respond in under 1 second but with 2 charts on the page and 12000 data points, the plotly rendering slows down.

For one home there should be 365 or 12 data points, depending on whether we aggregate by day or month. So, chart performance isn't the concern.

What I would like to establish is how quickly the server can aggregate the 365 (daily) or 12 (monthly) data points for a single home with a high number (~12,000) of activities.

Notes: the mock data generator will generate data for multiple homes, which is alright. Since the task is to produce an aggregate chart for a single home, we just need to generate enough mock data so there is around 12,000 activities for a single home. Then, benchmark the server performance for a single home daily/monthly activity aggregates over one year.

Yes, the server responds quickly mostly in ~1.5sec.