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

Preload enterprise logos and promo images for /shops page #12723

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

johansenja
Copy link
Contributor

What? Why?

When visiting https://openfoodnetwork.org.uk/shops, the page load is very slow. Given that this page is linked to from the
CTA above the fold on https://openfoodnetwork.org.uk, it seems ideal that should load quickly.

One of the low-hanging fruits here is to make sure that each of the enterprise's logo and promo_image is preloaded, to avoid n+2 queries:
Screenshot 2024-08-01 at 14 26 05

It's not the most significant performance increase (though I have a few other ones too) - especially when there is caching - but it feels like a sensible thing to do

What should we test?

  • Visit /shops page

Release notes

Changelog Category (reviewers may add a label for the release notes):

  • User facing changes
  • API changes (V0, V1, DFC or Webhook)
  • Technical changes only
  • Feature toggled

Dependencies

I have some other low-hanging fruit optimisations that I might propose here too (which might also be more significant) but they should be distinct enough to be separate follow-ons

Documentation updates

N/A

Copy link
Member

@mkllnk mkllnk left a comment

Choose a reason for hiding this comment

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

Thank you! What an excellent contribution. Well done. I'm looking forward to your other optimisations.

@mkllnk mkllnk added the technical changes only These pull requests do not contain user facing changes and are grouped in release notes label Aug 1, 2024
Copy link
Collaborator

@rioug rioug left a comment

Choose a reason for hiding this comment

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

Nice one 👍 Thanks for your contribution 🙏

@rioug rioug merged commit 7e1af9e into openfoodfoundation:master Aug 5, 2024
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical changes only These pull requests do not contain user facing changes and are grouped in release notes
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants