Last activities home page block causes performance trouble
Describe the bug
We observed that disabling the last activity block reduced significantly the loading time for the home page.
To Reproduce
We use wrk but any stress tool will do the job.
Steps to reproduce the behavior:
- Load the homepage to bench the homepage loading time
- Go to /admin/organization/homepage/edit
- Drag and drop on the right the
last activity section
- Compare using your favorite stress tool
Expected behavior
Queries should be made in a way they are not so intensive every time the page is loaded.
Caching might be part of the solution be we might also want to think of ways we optimize the queries.
Update the section only every hour instead of every time the page is loaded etc.
This is an open discussion about caching strategy, should it be defined in Decidim and therefore tested? Or stay in the app?
Screenshots
Here is an example with caching activated on last_activites content block.

You can see that response time is above expected.
Additional context
You may find some optimization done on caching here:
OpenSourcePolitics/osp-app#117
Last activities home page block causes performance trouble
Describe the bug
We observed that disabling the last activity block reduced significantly the loading time for the home page.
To Reproduce
We use wrk but any stress tool will do the job.
Steps to reproduce the behavior:
last activitysectionExpected behavior
Queries should be made in a way they are not so intensive every time the page is loaded.
Caching might be part of the solution be we might also want to think of ways we optimize the queries.
Update the section only every hour instead of every time the page is loaded etc.
This is an open discussion about caching strategy, should it be defined in Decidim and therefore tested? Or stay in the app?
Screenshots

Here is an example with caching activated on last_activites content block.
You can see that response time is above expected.
Additional context
You may find some optimization done on caching here:
OpenSourcePolitics/osp-app#117