Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize latest data insights data #3822

Merged
merged 2 commits into from
Jul 30, 2024
Merged

Conversation

rakyi
Copy link
Contributor

@rakyi rakyi commented Jul 29, 2024

We could optimize the feed more, but I'm not sure if it's worth it. I haven't touched that part with the new features, i.e. after this fix, the feed page size is back to where it was before the new DI redesign.

@owidbot
Copy link
Contributor

owidbot commented Jul 29, 2024

Quick links (staging server):

Site Admin Wizard

Login: ssh owid@staging-site-optimize-latest-data-insights

SVG tester:

Number of differences (default views): 0 ✅
Number of differences (all views): 0 ✅

Edited: 2024-07-29 17:57:50 UTC
Execution time: 1.22 seconds

@rakyi rakyi requested a review from ikesau July 29, 2024 18:08
@rakyi rakyi marked this pull request as ready for review July 29, 2024 18:08
Comment on lines 834 to 837
// We don't need latest data insights nor their images on the
// index page.
dataInsight.latestDataInsights = []
dataInsight.imageMetadata = attachments.imageMetadata
Copy link
Member

Choose a reason for hiding this comment

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

This confused me just a little bit because I was expecting this adjustment to be done right next to the renderDataInsightsIndexPage call.

Would you mind clarifying that? 🙂

Copy link
Contributor Author

@rakyi rakyi Jul 30, 2024

Choose a reason for hiding this comment

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

I tweaked it a bit, let me know if it isn't good enough. I kept it in the loop, because that's where we have the attachments.imageMetadata for each data insight.

@rakyi rakyi force-pushed the optimize-latest-data-insights branch from f417c65 to d53dcb8 Compare July 30, 2024 08:21
@rakyi rakyi merged commit d126305 into master Jul 30, 2024
20 checks passed
@rakyi rakyi deleted the optimize-latest-data-insights branch July 30, 2024 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants