Skip to content

Add caching to proposals#6808

Merged
mrcasals merged 5 commits intodecidim:developfrom
armandfardeau:feature/proposals-caching
Jan 13, 2021
Merged

Add caching to proposals#6808
mrcasals merged 5 commits intodecidim:developfrom
armandfardeau:feature/proposals-caching

Conversation

@armandfardeau
Copy link
Copy Markdown
Contributor

@armandfardeau armandfardeau commented Nov 5, 2020

We notice a lack of performance on the proposals index,

The first one is the filters, which are complex and generate a lot of rendering, and can be cached until the filter attributes change.

The second one is proposal cards, due to random seed ordering, it cannot be cached as a collection.

Therefore all proposals must be cached individually and rendered as a collection of cached objects.

The proposal card is complex and depends on many elements, (followers, votes, a user connected, etc...)

This pull request is a proposition of implementation, feel free to discuss it.

Performance overall

one eu newrelic com_launcher_nr1-core explorer_pane=eyJuZXJkbGV0SWQiOiJhcG0tbmVyZGxldHMub3ZlcnZpZXciLCJlbnRpdHlJZCI6Ik1qVXpOVGcxTjN4QlVFMThRVkJRVEVsRFFWUkpUMDU4TVRBd05UQTNORGs0In0= sidebars 0 =eyJuZXJkbGV0SWQiOiJucjEtY29yZS5hY3Rpb25zIiw (2)
one eu newrelic com_launcher_nr1-core explorer_pane=eyJuZXJkbGV0SWQiOiJhcG0tbmVyZGxldHMub3ZlcnZpZXciLCJlbnRpdHlJZCI6Ik1qVXpOVGcxTjN4QlVFMThRVkJRVEVsRFFWUkpUMDU4TVRBd05UQTRNVGs1In0= sidebars 0 =eyJuZXJkbGV0SWQiOiJucjEtY29yZS5hY3Rpb25zIiwiZW5

@armandfardeau armandfardeau marked this pull request as draft November 5, 2020 15:11
@armandfardeau armandfardeau marked this pull request as ready for review November 19, 2020 11:36
@armandfardeau
Copy link
Copy Markdown
Contributor Author

armandfardeau commented Nov 19, 2020

@andreslucena Hello, what do you think about it? I would like to have your insights on this.

@andreslucena andreslucena changed the title Feature/proposals caching Add caching to proposals Dec 4, 2020
@Leusev Leusev self-requested a review December 14, 2020 08:21
Copy link
Copy Markdown
Contributor

@tramuntanal tramuntanal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the proposal @armandfardeau !
Remember to take the locale into account

Copy link
Copy Markdown
Contributor

@mrcasals mrcasals left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@mrcasals
Copy link
Copy Markdown
Contributor

Thanks, @armandfardeau! Merging!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants