Skip to content

Last activities home page block causes performance trouble #6142

@armandfardeau

Description

@armandfardeau

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:

  1. Load the homepage to bench the homepage loading time
  2. Go to /admin/organization/homepage/edit
  3. Drag and drop on the right the last activity section
  4. 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.
image

You can see that response time is above expected.

Additional context
You may find some optimization done on caching here:
OpenSourcePolitics/osp-app#117

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions